test_freq_table_nodata raises IndexError on Windows

Bug #934103 reported by Goyo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-wind
Fix Released
Low
Goyo

Bug Description

This test expect that ValueError is raised when calling freq_table with empty arrays, but in my Windows setup IndexError is raised instead. Maybe a numpy version issue?

======================================================================
ERROR: test_freq_table_nodata (__main__.Test_freq_table)
Test function freq_table with no data.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_analysis.py", line 438, in test_freq_table_nodata
    binsize=bs, cutoff=co)
  File "D:\Python27\lib\unittest\case.py", line 471, in assertRaises
    callableObj(*args, **kwargs)
  File "..\wind\analysis.py", line 217, in freq_table
    h[:, 0] += h[:, -1]
IndexError: invalid index

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

Numpy version 1.6.1 from PythonXY.

Revision history for this message
Goyo (goyodiaz) wrote :

This test expects a ValueError exception, raised by numpy < 1.6 when indexing an empty array. numpy 1.6 raises IndexError instead.
Fixed in r268.

Changed in python-wind:
milestone: none → 0.12.0
assignee: nobody → Goyo (goyodiaz)
importance: Undecided → Low
status: New → Fix Committed
Revision history for this message
Goyo (goyodiaz) wrote :

Fixed in release 0.11.2

Changed in python-wind:
milestone: 0.12.0 → 0.11.2
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.