Currently, if one defines, for example, Base.IteratorSize(::MyMatrixLikeType) = Base.HasShape{2}()
, one still needs to define Base.ndims(mymat::MyMatrixLikeType) = 2
. Would it make sense to have a method for Base.ndims
that uses the type parameter of HasShape
so there is no need to manually define ndims
?