简体   繁体   中英

numpy python 3.4 for beginners

I am a beginner in programming.

I installed anaconda on my laptop in order to get numpy. After that I load the npy files as follows:

import numpy
X_train = numpy.load("train-features.npy")
X_test = numpy.load("test-features.npy")

Now I would like to see what there is inside them. So i tried to print them but it gives me a memory error.

How can I look into these file in order to understand how my data set looks like?

Without knowing details or error, I am assuming that you may be getting memory error due to memory buffer getting overwhelmed because of large size of your data. If that is the case, then you may want to memory map the npy / dat file to a disk.

Detailed examples are available at scipy.org numpy.load page and details about numpy.memmap are available here

If you can post error and provide more insight into data that may help one with determining correct cause of the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM