Re: [Numpy-discussion] Change in memmap behaviour

2012-07-02 Thread Sveinung Gundersen
On 2. juli 2012, at 22.40, Nathaniel Smith wrote: > On Mon, Jul 2, 2012 at 6:54 PM, Sveinung Gundersen wrote: >> [snip] >> >> >> >> Your actual memory usage may not have increased as much as you think, >> since memmap objects don't necessarily

Re: [Numpy-discussion] Change in memmap behaviour

2012-07-02 Thread Sveinung Gundersen
rray.item() >else: > return scalar_or_0d_array > # works on both numpy 1.5 and numpy 1.6: > total = scalarify(a.sum()) Thank you for this! However, such a solution would have to be scattered throughout the code (probably over 100 places), and I would rather not do that. I g

[Numpy-discussion] Change in memmap behaviour

2012-07-02 Thread Sveinung Gundersen
k (most recent call last): File "", line 1, in AttributeError: 'numpy.int64' object has no attribute '__iter__' >>> len(a.sum()) Traceback (most recent call last): File "", line 1, in TypeError: object of type 'numpy.int64' h