[SciPy-Dev] ANN: SciPy 0.10.0 beta 2

Stéfan van der Walt stefan@sun.ac...
Sun Sep 18 15:04:44 CDT 2011


On Sun, Sep 18, 2011 at 12:37 PM, Christoph Gohlke <cgohlke@uci.edu> wrote:
> 4) FAIL: test_datatypes.test_uint64_max
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "X:\Python27\lib\site-packages\nose\case.py", line 197, in runTest
>     self.test(*self.arg)
>   File
> "X:\Python27\lib\site-packages\scipy\ndimage\tests\test_datatypes.py",
> line 57, in test_uint64_max
>     assert_true(x[1] > (2**63))
> AssertionError: False is not true
>
>
> This is due to the 32 bit visual C compiler using signed int64 when
> converting between uint64 to double.  Anyway, it seems unreliable to me
> to cast back and forth between uint64 and double types for large numbers
> because of potential overflow and precision loss.

What would be the correct way to write this test?  It is simply meant
to ensure that numbers close to the upper limit of 64-bit uints are
preserved during interpolation operations.

Regards
Stéfan


More information about the SciPy-Dev mailing list