[Numpy-discussion] another view puzzle
Pierre GM
pgmdevlist at gmail.com
Wed Jun 3 19:21:57 EDT 2009
On Jun 3, 2009, at 7:00 PM, Robert Kern wrote:
> On Wed, Jun 3, 2009 at 17:58, <josef.pktd at gmail.com> wrote:
>> Do you have an opinion about whether .view(ndarray_subclass) or
>> __array_wrap__ is the more appropriate return wrapper for function
>> such as the ones in stats?
>
> __array_wrap__ would be more appropriate. It's what ufuncs use.
And it would work w/ MaskedArrays (using a simple .view(MaskedArray)
would wipe out some information, while MaskedArray.__array_wrap__
keeps it)
More information about the NumPy-Discussion
mailing list