Closed
Description
This works fine:
In [24]: np.asarray(np.array([np.asarray([10, 20])]), np.float32)
Out[24]:
array([[ 10., 20.]], dtype=float32)
but this does not work:
In [25]: np.asarray(pd.Series([np.asarray([10, 20])]), np.float32)
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-25-afb8b06bdf8c> in <module>()
----> 1 np.asarray(pd.Series([np.asarray([10, 20])]), np.float32)
/usr/local/lib/python2.7/dist-packages/numpy/core/numeric.pyc in asarray(a, dtype, order)
460
461 """
--> 462 return array(a, dtype, copy=False, order=order)
463
464 def asanyarray(a, dtype=None, order=None):
ValueError: setting an array element with a sequence.