Mar-29-2020, 06:35 AM
(Mar-18-2020, 10:06 AM)scidam Wrote: You cann't do this with default dtype (np.float64). However, numpy arrays are mutable,
so, if you define a-array withdtype= 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)
But my example code uses multidimensional arrays. If I try that with your code, it doesn't work anymore.