Not sure if this is intended behavior or a bug, but I had been under the assumption that the result of np.ascontiguousarray would be the same shape as the input. This is true except in the case of scalars.
>>> scalar = np.float64(3.0)
>>> np.asarray(scalar).shape # asarray doesn't change shape
()
>>> np.ascontiguousarray(scalar).shape # ascontiguousarray does
(1,)
If this is what should be expected, it would be helpful to document this in its docstring.
Thanks!