[NumPy-Tickets] [NumPy] #1574: 1.5.0b1 umath complex failures on Windows
NumPy Trac
numpy-tickets@scipy....
Sun Aug 8 11:06:12 CDT 2010
#1574: 1.5.0b1 umath complex failures on Windows
------------------------+---------------------------------------------------
Reporter: rgommers | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 1.5.0
Component: numpy.core | Version: devel
Keywords: |
------------------------+---------------------------------------------------
Comment(by pv):
Yep, `HAVE_CSQRT`, `HAVE_CEXP`, et al. are defined, so it's using the
platform-provided routines. And those appear to be buggy on that platform.
It's not so clear how to fix this:
1) It's a bug, but,
2) it's not a bug in Numpy,
3) Probably, most users won't care if `exp(inf+0j) == inf+0j` or
`inf+nanj`.
One could re-check that the results in `test_umath_complex.py` are
specified by C99 as mandatory and not as optional, though.
If we want to provide reliable corner-case behavior on all platforms, we
should check some simple cases on compile time.
But if we don't really care, we could as well add a check in
`test_umath_complex.py` that sets
{{{
functions_seem_flaky = (np.exp(complex(np.inf, 0)).imag != 0)
skip_complex_tests = have_platform_functions and functions_seem_flaky
def platform_skip(func):
return dec.skipif(skip_complex_tests,
"Numpy is using complex functions (e.g. sqrt) provided by your
platform's C library. "
"However, they do not seem to behave according to C99 -- so C99
tests are skipped.")(func)
}}}
and sprinkle `platform_skip` to all C99-specific tests. I'm not sure how
to best check for the platform functions though.
I think just skipping these tests is a sensible option.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1574#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list