[Numpy-discussion] Large array using 4 times as much memory as it should

Robert Kern robert.kern@gmail....
Thu Oct 30 20:46:30 CDT 2008

On Thu, Oct 30, 2008 at 20:41, Rick Giuly <rgiuly@gmail.com> wrote:
> Hello All,
> I find that python is using about four times as much memory as it should
> need for arrays. This is problematic as I need to use all available
> memory for large 3D imaging datasets. Is there a way to get around this
> problem? Am I making a mistake? Is it a bug?

You are making a mistake. uint32s take up 4 bytes each. So
(1024,1024,50) takes up 4*50*1024*1024 bytes == 200 Mb.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the Numpy-discussion mailing list