[Numpy-discussion] add .H attribute?

Alan G Isaac alan.isaac at gmail.com
Sat Jul 13 16:37:09 EDT 2013


On 7/13/2013 1:46 PM, Nathaniel Smith wrote:
> Why not just write
>
> def H(a):
>      return a.conj().T
>
> in your local namespace?
>

First of all, I am sympathetic to being conservative
about the addition of attributes!

But the question about adding a.H about the possibility of improving
- speed (relative to adding a function of my own)
- readability (including error-free readability of others' code)
- consistency (across code bases and objects)
- competitiveness (with other array languages)
- convenience (including key strokes)

I agree that there are alternatives for the last of these.

Alan




More information about the NumPy-Discussion mailing list