Saving and loading numpy array

import bcolz
def save_array(fname, arr): c=bcolz.carray(arr, rootdir=fname, mode='w'); c.flush()
def load_array(fname): return bcolz.open(fname)[:]

Code snippet from http://course.fast.ai/.

Similar Posts:

Post a Comment

Your email is never published nor shared. Required fields are marked *