[SciPy-dev] Default data type of mtrand distributions
Wed Sep 24 15:34:56 CDT 2008
I'm using numpy to simulate - and then analyze - large scale (8k x 8k)
astronomical images. The counts per pixel are not expected to be much
greater that 100k for the brightest stars, so an int32 data type is
completely adequate for my needs. In some cases, an int16 data type
will do, when the brightest object has <65k counts. In fact, most
pixels are of the background sky with typical counts of <20. When I
add Poisson noise to the simulated image, the output array has a data
type of int64 on my 64 bit workstation. This results in an array size
of 512 MB, when a 256 MB array (i.e. int32 data type) will do.
So the question is: Is it possible to add a dtype keyword to the
distribution functions that will specify the output data type as
opposed to the current situation of defaulting to the largest possible
data type? How difficult is it to make such changes?
More information about the Scipy-dev