Open *.npy- Numpy file easy to read mode



Sometimes its required to open Numpy file in easy to read mode but its challenging sometimes to find an editor or reader which can open. When you open the file and read the numpy array we see multiple error either display is not showing complete data, due to size.

import numpy as np
#from matplotlib import pyplot as plt#import matplotlibimport glob

#f= open("data.txt","w+")for filename in glob.glob("*.*"):
    if '.npy' in filename:
        load = np.load(filename)
        print(filename)
        print(load)


Still the display on editor is :

x_test.npy
[[[0 0 0 ... 0 0 0]
  [0 0 0 ... 0 0 0]
  [0 0 0 ... 0 0 0]
  ...
  [0 0 0 ... 0 0 0]
  [0 0 0 ... 0 0 0]
  [0 0 0 ... 0 0 0]]


Now I struggled to find the right way to open and see what's inside Numpy file.

Then i found in blog, all windows based python installer comes with Spyder IDE.

Open using Spyder with the following steps and load the Numpy file:





Comments

Popular posts from this blog

Xmanager RHEL 6 xclock :command not found -- Resolved

Racktable on ubuntu installation

RPM Tit-Bits ;-)