Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: RFC: 101 Perl PDL Exercises for Data Analysis

by choroba (Cardinal)
on May 07, 2019 at 09:50 UTC ( [id://1233416]=note: print w/replies, xml ) Need Help??


in reply to RFC: 101 Perl PDL Exercises for Data Analysis

Very nice younger sibling to RFC: 100 PDL Exercises (ported from numpy)!

Just one nitpick: Why do you use the command line? Using scripts or the PDL interactive shell would be more friendly to people not using MSWin whose quoting your examples employ.

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: RFC: 101 Perl PDL Exercises for Data Analysis
by thechartist (Monk) on May 07, 2019 at 10:08 UTC

    I use the command line because later on, I am going to port exercises from the O'Reilly book Data Science at the Command Line to Perl. This nonsensical idea that Perl is unsuited for "data science" tasks (which is really data cleaning/munging) needs to be refuted.

    Data Science at the Command Line link

    I think this ability to do quick things at the command line is an advantage that Perl has over Python.

    You do bring up a good point about the quoting. How should I make this more general, to make clear these one-liners work (with some modification) on all systems that have Perl and PDL installed?

      You might be interested to use the Perl debugger as REPL

      perl -MPDL -de0

      You'd have less typing and others could easily copy.

      And you can also dump edit history when needed.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      I would heavily recommend either perldl or pdl2 as REPLs, over the Perl debugger, because it's more specifically set up for PDL stuff; they both load PDL and PDL::NiceSlice, have a help system, a demo system, and facilitate multi-line commands including copy-paste support.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1233416]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-19 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found