error: cannot convert ‘af::array’ to ‘float’ in return code example
Example: ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type float).
np.asarray(x).astype('float32')
#otherwise probably faulty data
np.asarray(x).astype('float32')
#otherwise probably faulty data