This is a code. I made a list including two ndarray with different shape.
d = []
a = np.arange(183).reshape(3,61)
b = np.arange(51).reshape(3,17)
d = [a,b]
np.array(d)
Error is like below.
File "C:\Program Files\JetBrains\PyCharm 2019.1.1\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "D:/dev/workspace/rl/test/npcopy.py", line 10, in <module>
np.array(d)
ValueError: could not broadcast input array from shape (3,61) into shape (3)
np.copy() works when two ndarrays' first shpae are different. but if not, it is not working like above.
if I change this code as below,
import numpy as np
d = []
a = np.arange(183).reshape(4, 61)
b = np.arange(51).reshape(3, 17)
d = [a,b]
np.array(d)
it works!! so weird!!