[SciPy-dev] scipy.stats._chk_asarray

Pierre GM pgmdevlist@gmail....
Wed Jun 3 00:01:12 CDT 2009


On Jun 3, 2009, at 12:55 AM, Robert Kern wrote:
>>>
>>
>> Well, what about that:
>> * convert the inputs to ndarray w/ _chk_asarray
>> * compute as usual
>> * return a view of the result using the type of the input (using the
>> type keyword of view)
>> That should work w/ nanmedian. There might be some adjustment to make
>> for nanstd (pb of dimensions?)
>
> That is what I was suggesting, only in decorator form so it could be
> applied everywhere. It's not worth wasting time making a small handful
> of functions work and be inconsistent with all of the others.

I was describing how the factory classes that I mentioned later in  
that email were working.
But as usual, you're right decorators are more general and probably  
cleaner (now that we don't have to support Python 2.3).


More information about the Scipy-dev mailing list