[Python-ideas] 0-dimensional memoryviews?

Alexander Belopolsky alexander.belopolsky at gmail.com
Mon Sep 3 18:55:32 CEST 2012

On Mon, Sep 3, 2012 at 12:35 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> Is there any point in 0-dimensional views? Wouldn't it be clearer if we
> simply mandated a strictly positive number of dimensions?

0-d arrays (scalars) are very important in numpy and it took a
significant effort to get the semantics right.   I would argue that in
nonnumeric contexts, 0-d case is even more important than 1d.  For
example, users of ctypes are rarely exposed to arrays, but often see
nontrivial scalars.

More information about the Python-ideas mailing list