If all you need is to call ravel on your list (nested, I want?), You can do it directly, numpy will cast for you:
L = [[1,None,3],["The", "quick", object]] np.ravel(L) # array([1, None, 3, 'The', 'quick', <class 'object'>], dtype=object)
It's also worth mentioning that you don't need to go through numpy at all .
Paul Panzer Jun 30 '19 at 1:41 2019-06-30 01:41
source share