[Numpy-discussion] Attributes vs functions in numarray.

Tim Hochberg tim.hochberg at ieee.org
Mon Sep 16 13:43:04 CDT 2002


[Me (Tim Hochberg)]

> > Can someone refresh my memory as to why some properties of
> > NumArrays that are conceptually attributes are accessed as
> > atributes (a.shape, a.rank), while others are accessed
> > through functions (a.type, a.iscontiguous,...).

[Paul F Dubois]

> Because that is what Numeric did, and as explained in the position
> statement on the numpy website, we are not changing things unless we
> have a compelling reason.

Fair enough, but what about attributes new to numarray (rank, type, maybe
others). Is the preference then for function syntax over attribute syntax?
I'd prefer the latter, but I'm mostly trying to figure out what the pattern
is.

-tim






More information about the Numpy-discussion mailing list