On Sun, Feb 22, 2009 at 11:49 PM, Darren Dale wrote:
> On Sun, Feb 22, 2009 at 10:35 PM, Darren Dale wrote:
>
>> I've been finding some numpy functions that could maybe be improved to
>> work better with ndarray subclasses. For example:
>>
>> def fix(x, y=None):
>> x = nx.asanyarray(x)
>>
On Sun, Feb 22, 2009 at 10:35 PM, Darren Dale wrote:
> I've been finding some numpy functions that could maybe be improved to work
> better with ndarray subclasses. For example:
>
> def fix(x, y=None):
> x = nx.asanyarray(x)
> if y is None:
> y = nx.zeros_like(x)
> y1 = nx.flo
I've been finding some numpy functions that could maybe be improved to work
better with ndarray subclasses. For example:
def fix(x, y=None):
x = nx.asanyarray(x)
if y is None:
y = nx.zeros_like(x)
y1 = nx.floor(x)
y2 = nx.ceil(x)
y[...] = nx.where(x >= 0, y1, y2)
re