I have a complicated nested numpy array which contains list. I am trying to converted the elements to float32. However, it gives me following error:
ValueError Traceback (most recent call last)
<ipython-input-225-22d2824961c2> in <module>
----> 1 x_train_single.astype(np.float32)
ValueError: setting an array element with a sequence.
Here is the code and sample input:
x_train_single.astype(np.float32)
array([[ list([[[0, 0, 0, 0, 0, 0]], [-1.0], [0]]),
list([[[0, 0, 0, 0, 0, 0], [173, 8, 172, 0, 0, 0]], [-1.0], [0]])
]])
float32array acceptable?numpy.float32inside a Python list takes more space than an ordinary Python float?