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

nanmask #8

Open
tompc35 opened this issue Dec 27, 2015 · 0 comments
Open

nanmask #8

tompc35 opened this issue Dec 27, 2015 · 0 comments

Comments

@tompc35
Copy link

tompc35 commented Dec 27, 2015

First of all, thank you for providing these very useful tools. I would just like to suggest a very minor change to the nanmask function in octant/tools.py. When I run the following commands,

import octant.tools
import numpy as np
a = np.array([np.nan,2,3,4])
amsk = octant.tools.nanmask(a)

I receive an error message:

Traceback (most recent call last):
File "", line 1, in
File "/Users/tompc/programs/anaconda/lib/python2.7/site-packages/octant/tools.py", line 35, in nanmask
return np.ma.masked_where(isnan(a), a)
NameError: global name 'isnan' is not defined*

I think that line 35 of tools.py,

return np.ma.masked_where(isnan(a), a)

should be changed to:

return np.ma.masked_where(np.isnan(a), a)

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

No branches or pull requests

1 participant