[Numpy-discussion] Attributes vs functions in numarray.

Paul F Dubois paul at pfdubois.com
Mon Sep 16 13:27:04 CDT 2002

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. 

Numeric did some things like a.shape as properties rather than pairs of
get/set functions; there was no special reason for it except a feeling
that it was easier to type or looked more mathematical. E.g.,
x.imaginary. I think the driving reason for shape was interactive use:

However we got here, we aren't going to debate changing any of this. The
scalar issue is on the table because it causes actual trouble for real
people rather than philosophical inconsistency. 
> 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,...).
> Thanks,
> -tim

More information about the Numpy-discussion mailing list