[Numpy-discussion] add .H attribute?
Alan G Isaac
alan.isaac at gmail.com
Tue Jul 23 13:53:54 EDT 2013
I'm trying to understand the state of this discussion.
I believe that propoents of adding a .H attribute have
- readability (and general ease of use)
- consistency with matrix and masked array
- forward looking (to a future when .H can be a view)
The opponents have primarily emphasized
- inconsistency with convention that for arrays
instance attributes should return views
Is this a correct summary?
If it is correct, I believe the proponents' case is stronger.
All the considerations are valid, so it is a matter of
deciding how to weight them.
The alternative of offering a new method seems inferior in
terms of readability and consistency, and it is not adequately
If the alternative is nevertheless chosen, I suggest that it
should definitely *not* be .H(), both because of the conflict
with uses by matrix and masked array, and because I expect
that eventually the desire for an attribute will win the day,
and it would be a shame for the obvious notation to be lost.
More information about the NumPy-Discussion