Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to convrete .npz file to txt file in python

import numpy as np
import sys
data = np.load("file_name.npz")
print(data.files)
row = data.files
np.set_printoptions(threshold=np.inf)
print(data['arr_0'])
sys.stdout=open("test.txt","w")
for i in row:
    print("--------------------------")
    print(data[i])
sys.stdout.close()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convrete #file #txt #file #python
ADD COMMENT
Topic
Name
1+9 =