Here is the code in question:
arr = ['-0.944', '0.472', '0.472']
charges = [np.float64(i) for i in arr] # [-0.944, 0.472, 0.472]
charges = np.ndarray(charges)
The error is thrown on the last step, where the list is casted to an ndarray. Assigning dtype=np.float64 in ndarray does not change the error. What is wrong with this snippet of code?
Numpy 1.14, Python 3.6.1
array, notndarray. Callingndarraydirectly is unusual.