[Numpy-discussion] add .H attribute?

Daπid davidmenhur at gmail.com
Wed Jul 24 08:47:59 EDT 2013


An idea:

If .H is ideally going to be a view, and we want to keep it this way,
we could have a .h() method with the present implementation. This
would preserve the name .H for the conjugate view --when someone finds
the way to do it.

This way we would increase the readability, simplify some matrix
algebra code, and keep the API consistency.

On 24 July 2013 13:08, Dave Hirschfeld <dave.hirschfeld at gmail.com> wrote:
> Nathaniel Smith <njs <at> pobox.com> writes:
>
>>
>>
>> As soon as you talk about attributes "returning" things you've already
>> broken Python's mental model... attributes are things that sit there,
>> not things that execute arbitrary code. Of course this is not how the
>> actual implementation works, attribute access *can* in fact execute
>> arbitrary code, but the mental model is important, so we should
>> preserve it where-ever we can. Just mentioning an attribute should not
>> cause unbounded memory allocations.
>>
>
> Yep, sorry - sloppy use of terminology which I agree is important in helping
> understand what's happening.
>
> -Dave
>
>
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion



More information about the NumPy-Discussion mailing list