Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Surface fitting with PDL

by jo37 (Deacon)
on Aug 09, 2020 at 18:47 UTC ( [id://11120525]=note: print w/replies, xml ) Need Help??


in reply to Surface fitting with PDL

I'm not an expert regarding PDL, but it's safe to say that re-arranging 2d data into 1d is a very cheap operation. There is no data movement involved - it's just the creation of a new index to the existing data.

UPDATE
Just to give an impression:

#!/usr/bin/perl use strict; use warnings; use feature 'say'; use PDL; my $p2d = sequence(3, 3); say $p2d; my $p1d = $p2d->clump(0, 1); say $p1d; $p1d->set(4, 42); say $p2d; __DATA__ [ [0 1 2] [3 4 5] [6 7 8] ] [0 1 2 3 4 5 6 7 8] [ [ 0 1 2] [ 3 42 5] [ 6 7 8] ]

Greetings,
-jo

$gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11120525]
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-26 06:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found