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

mean function of fields gives error #4

Open
wsijp opened this issue Feb 11, 2015 · 1 comment
Open

mean function of fields gives error #4

wsijp opened this issue Feb 11, 2015 · 1 comment

Comments

@wsijp
Copy link
Owner

wsijp commented Feb 11, 2015

Using newstoch.py, see below. This also happens on any 1D data (e.g. W=TAUX/X, then W.mean() )

In [109]: dW.mean()

AttributeError Traceback (most recent call last)
/home/nfs/z3049637/Dropbox/python/ in ()
----> 1 dW.mean()

/home/nfs/z3049637/github/spacegrids/spacegrids/fieldcls.pyc in mean(self, grid)
3540 ret_field = (self.dV()*self).sum(grid)/(self.dV()).sum(grid)
3541
-> 3542 ret_field.name = self.name
3543 ret_field.long_name = 'zonal mean ' + self.long_name
3544 ret_field.units = self.units

AttributeError: 'numpy.float64' object has no attribute 'name'

@wsijp
Copy link
Owner Author

wsijp commented Jul 16, 2015

This is probably fixed now

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