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

Issue885 durack1 numpy192 #915

Closed
wants to merge 3 commits into from
Closed

Issue885 durack1 numpy192 #915

wants to merge 3 commits into from

Conversation

durack1
Copy link
Member

@durack1 durack1 commented Nov 23, 2014

@doutriaux1 @aashish24 let's see if this passes the travis test and merge it as a 2.2 milestone

@doutriaux1
Copy link
Contributor

this one breaks:
variable.mean()
I'm trying to figure out why exactly. I think it's the way we inherit from numpy...

In [2]: s.mean()
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-2-115fb75d3a77> in <module>()
----> 1 s.mean()

/export/doutriaux1/build/install/lib/python2.7/site-packages/numpy/ma/core.pyc in mean(self, axis, dtype, out)
   4774         """
   4775         if self._mask is nomask:
-> 4776             result = super(MaskedArray, self).mean(axis=axis, dtype=dtype)
   4777         else:
   4778             dsum = self.sum(axis=axis, dtype=dtype)

/export/doutriaux1/build/install/lib/python2.7/site-packages/numpy/core/_methods.pyc in _mean(a, axis, dtype, out, keepdims)
     67     if isinstance(ret, mu.ndarray):
     68         ret = um.true_divide(
---> 69                 ret, rcount, out=ret, casting='unsafe', subok=False)
     70     elif hasattr(ret, 'dtype'):
     71         ret = ret.dtype.type(ret / rcount)

/export/doutriaux1/build/install/lib/python2.7/site-packages/numpy/ma/core.pyc in __array_wrap__(self, obj, context)
   2892                 return masked
   2893             else:
-> 2894                 result._mask = m
   2895                 result._sharedmask = False
   2896         #....

AttributeError: 'numpy.ndarray' object has no attribute '_mask'

In [3]: numpy.ma.mean(s)
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-4b33150f59ce> in <module>()
----> 1 numpy.ma.mean(s)

/export/doutriaux1/build/install/lib/python2.7/site-packages/numpy/ma/core.pyc in __call__(self, a, *args, **params)
   6080         method = getattr(a, method_name, None)
   6081         if method is not None:
-> 6082             return method(*args, **params)
   6083         # Still here ? Then a is not a MaskedArray
   6084         method = getattr(MaskedArray, method_name, None)

/export/doutriaux1/build/install/lib/python2.7/site-packages/numpy/ma/core.pyc in mean(self, axis, dtype, out)
   4774         """
   4775         if self._mask is nomask:
-> 4776             result = super(MaskedArray, self).mean(axis=axis, dtype=dtype)
   4777         else:
   4778             dsum = self.sum(axis=axis, dtype=dtype)

/export/doutriaux1/build/install/lib/python2.7/site-packages/numpy/core/_methods.pyc in _mean(a, axis, dtype, out, keepdims)
     67     if isinstance(ret, mu.ndarray):
     68         ret = um.true_divide(
---> 69                 ret, rcount, out=ret, casting='unsafe', subok=False)
     70     elif hasattr(ret, 'dtype'):
     71         ret = ret.dtype.type(ret / rcount)

/export/doutriaux1/build/install/lib/python2.7/site-packages/numpy/ma/core.pyc in __array_wrap__(self, obj, context)
   2892                 return masked
   2893             else:
-> 2894                 result._mask = m
   2895                 result._sharedmask = False
   2896         #....

AttributeError: 'numpy.ndarray' object has no attribute '_mask'

@durack1
Copy link
Member Author

durack1 commented Jan 8, 2015

Glad you have the test cases in place.. Otherwise we'd be in a bit of trouble with these updates and PRs..

@durack1
Copy link
Member Author

durack1 commented Feb 10, 2015

@doutriaux1 I note that numpy 1.9.2rc1 is now out.. What is the timeline you'd expect to get this updated? If it's helpful I'll keep and eye on the 1.9.2 releases and update sources when the final release is available

@durack1
Copy link
Member Author

durack1 commented Mar 4, 2015

@doutriaux1 1.9.2 is out, so sources have been updated..

@durack1 durack1 changed the title Issue885 durack1 numpy191 Issue885 durack1 numpy192 Mar 4, 2015
@durack1
Copy link
Member Author

durack1 commented Mar 4, 2015

@doutriaux1 this is tripping things over more than before - it seems like cython-numpy interactions have changed.. Certainly a 2.3+ item..

@aashish24
Copy link
Contributor

@durack1 done@

@aashish24
Copy link
Contributor

@durack1 @doutriaux1 can we close this merge request?

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

Successfully merging this pull request may close these issues.

4 participants