I tried to get solution for this code , hoping for a positive response
JavaScript
x
2
1
much_data = np.load('muchdata-50-50-20.npy')
2
output:
JavaScript
1
20
20
1
ValueError Traceback (most recent call last)
2
<ipython-input-6-6710fe7f2bb7> in <module>
3
----> 1 much_data = np.load('muchdata-50-50-20.npy')
4
5
~anaconda3envstf-gpu-cuda8libsite-packagesnumpylibnpyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding)
6
437 return format.open_memmap(file, mode=mmap_mode)
7
438 else:
8
--> 439 return format.read_array(fid, allow_pickle=allow_pickle,
9
440 pickle_kwargs=pickle_kwargs)
10
441 else:
11
12
~anaconda3envstf-gpu-cuda8libsite-packagesnumpylibformat.py in read_array(fp, allow_pickle, pickle_kwargs)
13
725 # The array contained Python objects. We need to unpickle the data.
14
726 if not allow_pickle:
15
--> 727 raise ValueError("Object arrays cannot be loaded when "
16
728 "allow_pickle=False")
17
729 if pickle_kwargs is None:
18
19
ValueError: Object arrays cannot be loaded when allow_pickle=False
20
Please let me know the solution for this
Advertisement
Answer
Try
JavaScript
1
2
1
much_data = np.load('muchdata-50-50-20.npy', allow_pickle=True)
2