You could also use rcols() to read in a mix of
perl arrays and PDL data. Some of the options
for rcols may simplify the perl pre-processing.
Cheers,
Chris
On 10/28/2017 15:33, Adam Russell wrote:
I have a data file in which each row has a variable number of columns.
I am reading this file into a regular Perl array first in order to do
some basic pre-processing of the data. I then am presently adding 0s
to pad each row to be as long as the longest row and so I have a
rectangular array. I then pass the array to pdl() and things seem OK.
Is there a way to do this easier though? To skip writing my own loop
to pad the array first? That is, a way to take the irregularity shaped
array and have pdl make it rectangular for me?
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
pdl-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pdl-general