0

I am doing a SMILES Embedding on one of my files. After the embedding, it gives me a .npz file. When I was trying to view the content inside the .npz file, I uses the code

import numpy as np
np_data=np.load('covid_cure_pure_conanical.npz')
for k in np_data:
    print(k)
    print(np_data[k])

Then, it gives me the data that got simplified as ... inside the array. Are there any ways to see the complete set? If not, are there anyways for me to change the npz file into files like .csv or .txt?

Thank you for your time.

hpaulj
  • 221,503
  • 14
  • 230
  • 353
Tachyon
  • 1
  • 2
  • `np_data[k]` will be a numpy array. Large arrays (by default >1000 elements) are displayed in summary form. Before trying to look at whole arrays, I'd suggest displaying summary information like `shape` and `dtype`. – hpaulj Jan 08 '21 at 18:20
  • Thanks a lot. However, what I am really trying to achieve is to get the actual values inside. (FYI, the np.shape only shows (0,99) and np.dtype says "Cannot interpret '' as a data type") – Tachyon Jan 09 '21 at 05:06
  • https://stackoverflow.com/questions/48603888/print-all-columns-and-rows-of-a-numpy-array?r=SearchResults&s=5|47.5910 – hpaulj Jan 09 '21 at 05:57

0 Answers0