I need to create numpy.ndarray from massive data using int, float or complex numbers.
I hope to do this with the numpy.asarray function.
I do not want to give it the strict dtype argument, because I want to convert complex values ββto complex64 or complex128 , floats before float32 or float64 , etc.
But if I just ran numpy.ndarray(some_unknown_data) and looked at the dtype of my result, how can I understand that the data is numeric, not objects or strings or something else?
python arrays types numpy
Felix
source share