[Numpy-discussion] Should dtypes have an ndim attribute?

Andy Ray Terrel andy.terrel at gmail.com
Thu Dec 10 07:11:30 EST 2015

That's essentially what datashape did over in the blaze ecosystem. It gets
a bit fancier to support ragged arrays and optional types.

On Dec 10, 2015 5:14 AM, "Gerrit Holl" <gerrit.holl at gmail.com> wrote:

> Hi,
> I have made a modest proposal in issue #6752
> <https://github.com/numpy/numpy/issues/6752>.  Basically, the proposal
> is to add an `ndim` attribute to dtypes.  Currently, arrays have a
> shape and an ndim attribute, where ndim equals len(shape).  dtype
> objects have a shape attribute, but no corresponding ndim.
> An ndim attribute would help in immediately determining whether a
> field in a structured dtype is multidimensional or not.
> Thoughts?
> Gerrit.
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> https://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20151210/c0139263/attachment.html>

More information about the NumPy-Discussion mailing list