Re: [Numpy-discussion] return type from ufuncs

2014-11-20 Thread Nathaniel Smith
On Thu, Nov 20, 2014 at 5:47 PM, Marek Wojciechowski wrote: > Hi! > > I wrote a simple subclass of np.ndarray and now i do call np.sum() on it. I > expected that the result will be a python float (or int) just like when > summing > up regular arrays. Instead i obtain the (scalar) view of my subcl

[Numpy-discussion] return type from ufuncs

2014-11-20 Thread Marek Wojciechowski
Hi! I wrote a simple subclass of np.ndarray and now i do call np.sum() on it. I expected that the result will be a python float (or int) just like when summing up regular arrays. Instead i obtain the (scalar) view of my subclass. How can i change this behavior? I tried writing __array_wrap__ me