Yes, I also got a private message pointing me at some file doc. Looks like the pages I was reading a couple days ago, on the . .npy file format were woefully incorrect. (Or - not correct at the file format level, only correct at the level of abstraction presented to the python programmer.)
Thanks, -- Raul On Wed, Dec 5, 2018 at 1:31 PM John Baker <bakerj...@gmail.com> wrote: > > The npz format is just a zipped version of many npy files. The npy format > is very straightforward you can read > about the internal layout here: > > https://docs.scipy.org/doc/numpy-1.14.0/neps/npy-format.html > > numpy arrays support a wider range of datatypes than J arrays but most the > numeric types, including complex numbers, can be easily mapped to J > equivalents. > > Bill's suggestion to use the J python3 addon sidesteps the issue. Read it > from python and shove it into J. > > cheers > > > > On Wed, Dec 5, 2018 at 9:44 AM bill lam <bbill....@gmail.com> wrote: > > > An easier way may be read the file using python and then send arrays to J > > using the python addon. > > > > On Wed, Dec 5, 2018, 6:34 AM Devon McCormick <devon...@gmail.com wrote: > > > > > Has anyone written code to convert arrays in the numpy save format (.npz > > > file) to an array in J? An example of the MNIST digits recognition set > > is > > > here: https://s3.amazonaws.com/img-datasets/mnist.npz . > > > > > > I was looking to do this myself. At the moment, I'm thinking of using > > > Python to read in the array, then write it back out in a text format > > that J > > > can read and turn into a J array but this sounds cumbersome. > > > > > > Does anyone have a better, more direct way than this? > > > > > > Thanks, > > > > > > Devon > > > -- > > > > > > Devon McCormick, CFA > > > > > > Quantitative Consultant > > > ---------------------------------------------------------------------- > > > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > -- > John D. Baker > bakerj...@gmail.com > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm