While trying to convert a numpy array into a Spark DataFrame, I receive Can not infer schema for type: <class 'numpy.float64'> error.
The same thing happens with numpy.int64 arrays.
Example:
df = spark.createDataFrame(numpy.arange(10.))
TypeError: Can not infer schema for type: <class 'numpy.float64'>