I was creating a numpy.empty([0]) array and accidentally typed numpy.empty([]).
This created an numpy array with the string representation
array(0.)
with size
>>> numpy.empty([]).size
1
and shape
>>> numpy.empty([]).shape
()
Question: what is the nature of this object?
I couldn't deduce it from the documentation of numpy.empty.
In particular, what I find most confusing is the 0. that appears in the string representation, which seems to be a float(0.0). If it is somehow representing an element, this is not accessible. I was trying to access it as numpy.empty([])[0].
The object is different in nature from the one created by numpy.empty([0]), which has size
>>> numpy.empty([0]).size
0
and shape
>>> numpy.empty([0]).shape
(0,)