junxnone / tio

Log
Other
10 stars 5 forks source link

numpy - binary files - NPY - NPZ - txt #385

Open junxnone opened 5 years ago

junxnone commented 5 years ago

Reference

Usecase

Function Description
load(file[, mmap_mode, allow_pickle, ...]) Load arrays or pickled objects from .npy, .npz or pickled files.
save(file, arr[, allow_pickle, fix_imports]) Save an array to a binary file in NumPy .npy format.
savez(file, *args, **kwds) Save several arrays into a single file in uncompressed .npz format.
savez_compressed(file, *args, **kwds) Save several arrays into a single file in compressed .npz format.
numpy.loadtxt() load the txt file to numpy arrays

Save txt

np.savetxt("cv.txt", img[:,240:320,0], fmt='%i', delimiter=',')
junxnone commented 4 years ago

9