A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-June/065786.html below:

[Python-Dev] Pre-PEP: Allow Empty Subscript List Without Parentheses

[Python-Dev] Pre-PEP: Allow Empty Subscript List Without Parentheses [Python-Dev] Pre-PEP: Allow Empty Subscript List Without ParenthesesGreg Ewing greg.ewing at canterbury.ac.nz
Sat Jun 10 08:15:19 CEST 2006
Nick Coghlan wrote:

> I think it more comes from the n-dimensional array approach - 'n=0' is 
> then a natural issue to consider.

But only if it makes sense. I still think there are some
severe conceptual difficulties with 0D arrays. One is
the question of how many items it contains. With 1 or
more dimensions, you can talk about its size along any
chosen dimension. But with 0 dimensions there's no size
to measure. Who's to say a 0D array has a size of 1, then?
Part of my brain keeps saying it should be 0 -- i.e.
it contains nothing at all!

Also, what kind of thing does a[] yield? Do we finally,
at last, get an actual scalar, or do we get a -1 dimensional
array? :-)

I'm having trouble seeing a real use for a 0D array as
something distinct from a scalar, as opposed to them
just being an oddity that happens to arise as a side
effect of the way Numeric/Numpy are implemented.

--
Greg
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4