Dnia czwartek, 20 listopada 2014 18:47:41 Marek Wojciechowski pisze:
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
Dnia piÄ…tek, 21 listopada 2014 00:09:51 Nathaniel Smith pisze:
On Thu, Nov 20, 2014 at 5:47 PM, Marek Wojciechowski mw...@p.lodz.pl
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
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__
On Thu, Nov 20, 2014 at 5:47 PM, Marek Wojciechowski mw...@p.lodz.pl 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