Mar-18-2020, 10:06 AM
You cann't do this with default dtype (np.float64). However, numpy arrays are mutable,
so, if you define a-array with
Try the following example:
so, if you define a-array with
dtype= np.object
,everything should work fine. Try the following example:
a = np.array([1,3,4], dtype=np.object) b = np.array([0]) a[0] = b print(a) b[0] = 99 print(a)