[SciPy-dev] Default data type of mtrand distributions
Wed Sep 24 16:06:22 CDT 2008
On Wed, Sep 24, 2008 at 15:34, Paul Barrett <firstname.lastname@example.org> wrote:
> 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?
Probably more annoying than difficult but sufficiently annoying that
I'm not going to do it any time soon. Present me with a complete
patch, though ...
"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 Scipy-dev