Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix non-integer index error #273

Merged
merged 1 commit into from Jan 16, 2017
Merged

fix non-integer index error #273

merged 1 commit into from Jan 16, 2017

Conversation

grlee77
Copy link
Contributor

@grlee77 grlee77 commented Jan 16, 2017

This is a fix for the failure on Appveyor in the most recent commit (due to a non-integer shape in the data readers):

FAIL: Doctest: pywt.data._readers.nino
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python27\lib\doctest.py", line 2226, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for pywt.data._readers.nino
  File "C:\projects\pywt\build\lib\pywt\data\_readers.py", line 142, in nino
----------------------------------------------------------------------
File "C:\projects\pywt\build\lib\pywt\data\_readers.py", line 164, in pywt.data._readers.nino
Failed example:
    time, sst = pywt.data.nino()
Exception raised:
    Traceback (most recent call last):
      File "c:\python27\lib\doctest.py", line 1315, in __run
        compileflags, 1) in test.globs
      File "<doctest pywt.data._readers.nino[1]>", line 1, in <module>
        time, sst = pywt.data.nino()
      File "C:\projects\pywt\build\lib\pywt\data\_readers.py", line 180, in nino
        sst = np.mean(np.reshape(np.array(sst_csv)[:n,4],(n/3,-1)),axis=1)
    TypeError: slice indices must be integers or None or have an __index__ method
----------------------------------------------------------------------
File "C:\projects\pywt\build\lib\pywt\data\_readers.py", line 165, in pywt.data._readers.nino

@grlee77 grlee77 added the bug label Jan 16, 2017
@grlee77 grlee77 added this to the v1.0 milestone Jan 16, 2017
@grlee77
Copy link
Contributor Author

grlee77 commented Jan 16, 2017

The failure started occuring because Appveyor is now using numpy 1.12 which no longer allows floats as indices

@codecov-io
Copy link

codecov-io commented Jan 16, 2017

Current coverage is 86.28% (diff: 100%)

Merging #273 into master will not change coverage

@@             master       #273   diff @@
==========================================
  Files            20         20          
  Lines          3056       3056          
  Methods          45         45          
  Messages          0          0          
  Branches        525        525          
==========================================
  Hits           2637       2637          
  Misses          369        369          
  Partials         50         50          

Powered by Codecov. Last update 47f50e7...bf09301

@grlee77 grlee77 merged commit 8bb4430 into PyWavelets:master Jan 16, 2017
@grlee77
Copy link
Contributor Author

grlee77 commented Jan 16, 2017

went ahead and self-merged this small fix for numpy 1.12 compatibility so that master passes CI again

@grlee77 grlee77 mentioned this pull request Jan 16, 2017
@rgommers
Copy link
Member

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants