Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: How to iterate through a PDL piddle?

by etj (Deacon)
on May 26, 2022 at 14:41 UTC ( [id://11144198]=note: print w/replies, xml ) Need Help??


in reply to Re^3: How to iterate through a PDL piddle?
in thread How to iterate through a PDL piddle?

  • dog returns a list of PDL slices, as Dima says, so a 2,3,4 ndarray dog-ed would return 4 ndarrays each dimensioned 2,3 (and as they're "slices", updates to them would be reflected in the original ndarray)
  • list returns the ndarray flattened (so the whole thing in a single flat list) as Perl scalars, so a 2,3,4 would be a list of 24 Perl scalars
  • unpdl (as of 2.006 from 2013, as provided by the mighty Joel Berger), which returns the ndarray as an array-ref with the same (possibly nested) structure as the input ndarray.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-24 09:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found