[SciPy-User] Efficient 2-d arrays using standard python?

Nathaniel Smith njs at pobox.com
Mon Jan 17 21:35:17 EST 2011


On Mon, Jan 17, 2011 at 6:16 PM, David <david at silveregg.co.jp> wrote:
> On a 64 bits
> machine, the size taken by the numpy array will not change so much,
> whereas the size will be almost doubled for the list case (everything
> sees its size doubled except for the integer value itself).

ObNitPick: The integer value itself will be doubled too; python 'int'
is 64-bit on 64-bit machines. (Well, at least on Linux; it might only
be 32-bits on Windows with its LLP64.)

# Python 2.5.2 on x86-64 Linux:
>>> type(2 ** 50)
<type 'int'>
>>> type(2 ** 65)
<type 'long'>

-- Nathaniel



More information about the SciPy-User mailing list