Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a GUI to see contents of .npy file?

Tags:

python

save

numpy

I am working with Python 2.

I have saved a dict of arrays to a .npy file on my computer. If I open it as a text file, a just see a mess of ASCII characters, as one would expect since I am not just saving arrays.

I can see its contents by np.load it in a Python console, but I was wondering whether there is a GUI that allows me to see the contents of the file directly, i.e. without going through a python console?

Basically: If I went back, I would save it as a json or hdf5 file so that I can open them with some viewer and could clearly see the data.
Having not done that, and having saved .npy files, can I see its contents in a similar way if they were json or hdf5?

like image 901
SuperCiocia Avatar asked Sep 14 '18 16:09

SuperCiocia


People also ask

How do I view a .NPY file?

The NPY array file can be loaded by using the np. load('filename. npy') function where filename. npy is the NPY file that already contains the array.

How do I use .NPY files?

NPY files store all the information required to reconstruct an array on any computer, which includes dtype and shape information. NumPy is a Python programming language library that provides support for large arrays and matrices. You can export an array to an NPY file by using np. save('filename.

What does NPY file contain?

The . npy format is the standard binary file format in NumPy for persisting a single arbitrary NumPy array on disk. The format stores all of the shape and dtype information necessary to reconstruct the array correctly even on another machine with a different architecture.


1 Answers

I think this tool can help you do what you need. It can help you edit the contents of .npy files like spreadsheets. It also has options to visualize .npy files as 2D grayscale images and 3D point clouds:

https://github.com/csmailis/NPYViewer

like image 126
Nikos Papanikolaou Avatar answered Oct 05 '22 11:10

Nikos Papanikolaou