Apr-01-2020, 01:16 PM
(Apr-01-2020, 01:52 AM)scidam Wrote:(Mar-30-2020, 07:24 PM)ThemePark Wrote: Now it's on to multidimensional arrays.The same rules are true for multidimensional cases.
import numpy as np x=np.ones((2,2,2), dtype=np.float32) z = np.zeros((2,2,2), dtype=np.object) z[0][0][0] = x x[0][0][0] = 99 print(z)
Okay, truthfully I didn't realize you'd go that way. But what I mean by multidimensional arrays is that z[0][0][0] would not contain x, but x[0][0][0] and then the 99 would be shown in both arrays.
You can look at my other post too, it's the same problem I'm trying to solve.