import numpy as np
#Reference: How to fix ‘Object arrays cannot be loaded when allow_pickle=False’ for imdb.load_data() function?
np_load_old = np.load
modify the default parameters of np.load
np.load = lambda *a,**k: np_load_old(*a, allow_pickle = True, **k)
Remove allow_pickle when calling np.load
data = np.load(‘/content/drive/MyDrive/Great_Leranings/Images.npy’)
error:
TypeError Traceback (most recent call last)
in <cell line: 8>()
6 np.load = lambda *a,**k: np_load_old(*a, allow_pickle = True, **k)
7
—-> 8 data = np.load(‘/content/drive/MyDrive/Great_Leranings/Images.npy’)
1 frames
in (*a, **k)
4
5 # modify the default parameters of np.load
—-> 6 np.load = lambda *a,**k: np_load_old(*a, allow_pickle = True, **k)
7
8 data = np.load(‘images.npy’)
TypeError: main.() got multiple values for keyword argument ‘allow_pickle’
Renuka Prasad is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.