array – Rectilinear array whose
shapeneeds to be known.
axis (int) – The dimension at which this operation is applied. The outermost dimension is
0, followed by
1, etc., and negative values count backward from the innermost:
-1is the innermost dimension,
-2is the next level up, etc.
Returns an int or a list of ints, one for each regular dimension.
array is not rectilinear (i.e. if #np.to_numpy would raise an
error), then this function raise an error.