pdl and arrays containing strings

Discussion in 'Perl Misc' started by ked, Sep 28, 2005.

  1. ked

    ked Guest

    This one really puzzles me.

    How do I convcert a traditional perl array @filelist into a PDL piddle
    on which I can index by using the PDL::NiceSlice module. Creating
    piddles and NiceSlice works great for everything about piddles of
    numbers, but when it comes to text I'm stuck.

    print @filelist[0]; returns someting like

    /home/user/data/some_datafile.dat


    $newfilelist = pdl @filelist;

    print $newfilelist(0:2); returns only

    [0 0 0]

    What am I missing?

    Ked
     
    ked, Sep 28, 2005
    #1
    1. Advertising

  2. "ked" <> wrote in news:1127905199.054144.14730
    @g47g2000cwa.googlegroups.com:

    > How do I convcert a traditional perl array @filelist into a PDL piddle
    > on which I can index by using the PDL::NiceSlice module. Creating
    > piddles and NiceSlice works great for everything about piddles of
    > numbers, but when it comes to text I'm stuck.


    ....

    > What am I missing?


    DESCRIPTION

    PDL is the Perl Data Language, a perl extension that is designed for
    scientific and bulk numeric data processing and display.

    Sinan
    --
    A. Sinan Unur <>
    (reverse each component and remove .invalid for email address)

    comp.lang.perl.misc guidelines on the WWW:
    http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html
     
    A. Sinan Unur, Sep 28, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Junmou Zhang
    Replies:
    0
    Views:
    1,424
    Junmou Zhang
    Jul 10, 2003
  2. Mark Ohlund

    PDL function call failing

    Mark Ohlund, May 2, 2004, in forum: Perl
    Replies:
    1
    Views:
    478
    Slaven Rezic
    May 2, 2004
  3. Ben

    Strings, Strings and Damned Strings

    Ben, Jun 22, 2006, in forum: C Programming
    Replies:
    14
    Views:
    768
    Malcolm
    Jun 24, 2006
  4. Philipp
    Replies:
    21
    Views:
    1,135
    Philipp
    Jan 20, 2009
  5. Keflavich
    Replies:
    0
    Views:
    129
    Keflavich
    Feb 15, 2007
Loading...

Share This Page