I am trying to save an array in one program and open it in another, my array is
[[ 0. 2815. 3286. 4060. 2877. 2236.]
[2798. 0. 471. 1245. 1586. 1931.]
[3165. 367. 0. 1006. 1556. 1902.]
[3724. 1268. 1739. 0. 551. 896.]
[3344. 1573. 1575. 2030. 0. 515.]
[2925. 1923. 1925. 2380. 641. 0.]]
to save it i am using:
def saveArray(array):
import numpy as np
np.save('postCodeArray', array)
Then to open it I am using
def callFunction():
import numpy as np
array = np.load('postCodeArray.npy')
print(array)
I get this error
" File "C:\Users\wf5931\AppData\Local\Continuum\anaconda3\lib\site-packages\numpy\lib\format.py", line 696, in read_array raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False"
Please help!
- when i tried it with a similar np.zeros((4,4)) matrix it seemed to work. V confused