[SciPy-User] Bottleneck 0.3 - some tests Fail

Hanno Klemm klemm at phys.ethz.ch
Fri Jan 21 10:22:49 EST 2011


Keith,

thanks for the new release. When I build bottleneck 0.3.0 two of the tests
fail. Are you aware of that,or is that a problem with my build?

I attached a text file of the session.

Regards,
Hanno



On Thu, Jan 20, 2011, Keith Goodman <kwgoodman at gmail.com> said:

> Bottleneck is a collection of fast NumPy array functions written in
> Cython. It contains functions like median, nanmedian, nanargmax,
> move_mean.
> 
> The third release of Bottleneck is twice as fast for small input
> arrays and contains 10 new functions.
> 
> Faster:
> - All functions are faster (less overhead in selector functions)
> 
> New functions:
> - nansum()
> - move_sum()
> - move_nansum()
> - move_mean()
> - move_std()
> - move_nanstd()
> - move_min()
> - move_nanmin()
> - move_max()
> - move_nanmax()
> 
> Enhancements:
> - You can now specify the dtype and axis to use in the benchmark timings
> - Improved documentation and more unit tests
> 
> Breaks from 0.2.0:
> - Moving window functions now default to axis=-1 instead of axis=0
> - Low-level moving window selector functions no longer take window as input
> 
> Bug fix:
> - int input array resulted in call to slow, non-cython version of move_nanmean
> 
> download
>    http://pypi.python.org/pypi/Bottleneck
> docs
>    http://berkeleyanalytics.com/bottleneck
> code
>    http://github.com/kwgoodman/bottleneck
> mailing list
>    http://groups.google.com/group/bottle-neck
> mailing list 2
>    http://mail.scipy.org/mailman/listinfo/scipy-user
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
> 
> 

-- 
Hanno Klemm
klemm at phys.ethz.ch


-------------- next part --------------
Python 2.6.6 |EPD 6.3-1 (64-bit)| (r266:84292, Sep 18 2010, 08:39:12) 
[GCC 3.4.6] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bottleneck as bn
>>> bn.__version__
'0.3.0'
>>> import numpy as np
>>> bn.test()
Running unit tests for bottleneck
NumPy version 1.4.0
NumPy is installed in /scratch/epd-6.3/lib/python2.6/site-packages/numpy
Python version 2.6.6 |EPD 6.3-1 (64-bit)| (r266:84292, Sep 18 2010, 
08:39:12) [GCC 3.4.6]
nose version 0.11.4
.........................................F.F
======================================================================
FAIL: Test move_max.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/scratch/epd-6.3/lib/python2.6/site-packages/nose/case.py", line 
186, in runTest
    self.test(*self.arg)
  File 
"/scratch/epd-6.3/lib/python2.6/site-packages/bottleneck/tests/move_test.py", 
line 58, in unit_maker
    err_msg)
  File 
"/scratch/epd-6.3/lib/python2.6/site-packages/numpy/testing/utils.py", 
line 765, in assert_array_almost_equal
    header='Arrays are not almost equal')
  File 
"/scratch/epd-6.3/lib/python2.6/site-packages/numpy/testing/utils.py", 
line 587, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal

func move_max | window 2 | input a96 (int32) | shape (1, 2, 3, 4) | axis 
-2

Input array:
[[[[ 0  1  2  3]
   [ 4  5  6  7]
   [ 8  9 10 11]]

  [[12 13 14 15]
   [16 17 18 19]
   [20 21 22 23]]]]

(x and y nan location mismatch [[[[False False False False]
   [False False False False]
   [False False False False]]

  [[False False False False]
   [False False False False]
   [False False False False]]]], [[[[ True  True  True  True]
   [False False False False]
   [False False False False]]

  [[ True  True  True  True]
   [False False False False]
   [False False False False]]]] mismatch)
 x: array([[[[  0.,   1.,   2.,   3.],
         [  4.,   5.,   6.,   7.],
         [  8.,   9.,  10.,  11.]],...
 y: array([[[[ NaN,  NaN,  NaN,  NaN],
         [  4.,   5.,   6.,   7.],
         [  8.,   9.,  10.,  11.]],...

======================================================================
FAIL: Test move_nanmax.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/scratch/epd-6.3/lib/python2.6/site-packages/nose/case.py", line 
186, in runTest
    self.test(*self.arg)
  File 
"/scratch/epd-6.3/lib/python2.6/site-packages/bottleneck/tests/move_test.py", 
line 58, in unit_maker
    err_msg)
  File 
"/scratch/epd-6.3/lib/python2.6/site-packages/numpy/testing/utils.py", 
line 765, in assert_array_almost_equal
    header='Arrays are not almost equal')
  File 
"/scratch/epd-6.3/lib/python2.6/site-packages/numpy/testing/utils.py", 
line 587, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Arrays are not almost equal

func move_nanmax | window 2 | input a96 (int32) | shape (1, 2, 3, 4) | 
axis -2

Input array:
[[[[ 0  1  2  3]
   [ 4  5  6  7]
   [ 8  9 10 11]]

  [[12 13 14 15]
   [16 17 18 19]
   [20 21 22 23]]]]

(x and y nan location mismatch [[[[False False False False]
   [False False False False]
   [False False False False]]

  [[False False False False]
   [False False False False]
   [False False False False]]]], [[[[ True  True  True  True]
   [False False False False]
   [False False False False]]

  [[ True  True  True  True]
   [False False False False]
   [False False False False]]]] mismatch)
 x: array([[[[  0.,   1.,   2.,   3.],
         [  4.,   5.,   6.,   7.],
         [  8.,   9.,  10.,  11.]],...
 y: array([[[[ NaN,  NaN,  NaN,  NaN],
         [  4.,   5.,   6.,   7.],
         [  8.,   9.,  10.,  11.]],...

----------------------------------------------------------------------
Ran 44 tests in 31.774s

FAILED (failures=2)
<nose.result.TextTestResult run=44 errors=0 failures=2>
>>> 



More information about the SciPy-User mailing list