Package: src:bottleneck
Severity: important

Dear Maintainer,

In my attempt to investigate why xarray fails to test with the packaged
bottleneck [1], I have looked at its packaging and enabled the test suite by
adding the missing b-deps on python[,3]-nose.

[1] https://github.com/pydata/xarray/issues/1208

However, the tests fail for both Python 2 and 3 with the following log:
```
======================================================================
FAIL: test move functions
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 729, in 
chk_same_position
    assert_array_equal(x_id, y_id)
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 871, in 
assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 796, in 
assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 8.333333333333329%)
 x: array([[ True,  True, False, False, False, False],
       [False, False, False, False, False,  True]], dtype=bool)
 y: array([[ True,  True, False, False, False, False],
       [False, False, False, False, False, False]], dtype=bool)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File 
"/home/gvaillan/workspace/debian/packages/bottleneck/build/lib.linux-x86_64-3.5/bottleneck/tests/move_test.py",
 line 42, in unit_maker
    aaae(actual, desired, decimal, err_msg)
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 979, in 
assert_array_almost_equal
    precision=decimal)
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 761, in 
assert_array_compare
    chk_same_position(x == +inf, y == +inf, hasval='+inf')
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 735, in 
chk_same_position
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 5 decimals

func move_median | window 4 | min_count 1 | input a50 (float32) | shape (2, 6) 
| axis -1 | order C

Input array:
[[ inf   7. -inf  -9. -10.  nan]
 [ nan   5.   4.  nan  nan  inf]]

x and y +inf location mismatch:
 x: array([[  inf,   inf,   7. ,  -1. ,  -9.5, -10. ],
       [  nan,   5. ,   4.5,   4.5,   4.5,   inf]], dtype=float32)
 y: array([[  inf,   inf,   7. ,  -1. ,  -9.5, -10. ],
       [  nan,   5. ,   4.5,   4.5,   4.5,   2. ]], dtype=float32)

======================================================================
FAIL: test reduce functions
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 729, in 
chk_same_position
    assert_array_equal(x_id, y_id)
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 871, in 
assert_array_equal
    verbose=verbose, header='Arrays are not equal')
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 796, in 
assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not equal

(mismatch 33.33333333333333%)
 x: array([False, False,  True], dtype=bool)
 y: array([False, False, False], dtype=bool)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File 
"/home/gvaillan/workspace/debian/packages/bottleneck/build/lib.linux-x86_64-3.5/bottleneck/tests/reduce_test.py",
 line 63, in unit_maker
    assert_array_almost_equal(actual, desired, decimal, err_msg)
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 979, in 
assert_array_almost_equal
    precision=decimal)
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 761, in 
assert_array_compare
    chk_same_position(x == +inf, y == +inf, hasval='+inf')
  File "/usr/lib/python3/dist-packages/numpy/testing/utils.py", line 735, in 
chk_same_position
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal to 5 decimals

func nanmedian | input a61 (float32) | shape (3, 4) | axis -1 | order C

Input array:
[[ inf   7. -inf  -9.]
 [-10.  nan  nan   5.]
 [  4.  nan  nan  inf]]

x and y +inf location mismatch:
 x: array([-1. , -2.5,  inf], dtype=float32)
 y: array([-1. , -2.5,  2. ], dtype=float32)

----------------------------------------------------------------------

```


It also fails if you run the build and test manually with:
```
python[,3] setup.py build
cd build/lib*
python[,3] -m nose
```

Please consider investigating this with upstream.

Best regards,
Ghis


-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (900, 'testing'), (300, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.8.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Reply via email to