[SciPy-User] overflow

Charles R Harris charlesr.harris@gmail....
Sat Jul 10 18:29:18 CDT 2010


On Sat, Jul 10, 2010 at 5:00 PM, Mr Nilsson <super.inframan@gmail.com>wrote:

> Hm well the reason im going 8/16 bit in the first place is to conserve
> memory, so going back to float isnt optimal..
> Is there a reason numpy overflows in the first place? Coming from an
> image processing background i cant really think of any situation where
> it would be preferable, possibly other than performance?
>
>
It's what c does, c integers are modulo 2**(whatever). You could write a
special purpose ufunc for scaling arrays if you really need that option.
There was a simple example here using cython a while back <looks>, OK, here
it is on the cython wiki
CreatingUFuncs<http://wiki.cython.org/MarkLodato/CreatingUfuncs>.
So you might want to ask on the cython list since the example might be a
touch on the sketchy side...

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100710/fc62dc59/attachment.html 


More information about the SciPy-User mailing list