|more useful options|
Mac to Windows Data Incompatibilityby goshawk (Initiate)
|on May 21, 2013 at 19:49 UTC||Need Help??|
goshawk has asked for the
wisdom of the Perl Monks concerning the following question:
Hello, all. I'm having an issue with a large and difficult-to-produce piddle matrix that I made on a Mac OS with 64 architecture(8-byte long), which I want to use in a perl program on a Windows OS with 64 architecture (4-byte long). If at all possible, I want to avoid recreating this data.
I want to load in a matrix, slice a row, then calculate the Pearson's correlation of that row against each other row using PDL::Stats::Basic corr. This works fine when I create a matrix in Windows and find the correlation in Windows, and it also works when I use the data I want to use to find the correlation on Mac, but not when I use data from the Mac OS in Windows. I've tried using PDL::IO::Storable and PDL::IO::Dumper. When I save/load the matrix using PDL::IO::Storable, I get this error:
When I save/load the matrix using PDL::IO::Dumper, it loads fine, but the correlation no longer works. Here's a MWE:
This code returns '-1.#IND', which is Windows for nan. Am I getting caught by the different data sizes again?