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
np.mean with keepdims=True does not work on memmap #6750
Comments
Old story, though I did not find a duplicate, so.... If you look at the code for The code:
|
Well, at least that explains why my local test for some function was not working on some cases, I'll just use a dirty workaround for the time being, thanks. I does confirm I'm not doing weird stuff at least and it's an unintended side effect. |
@seberg - I guess one has two choices:
|
Yes, 1. is best, unless you want to be able to pass |
**kwargs is more technically correct I guess (it avoids adding special
|
The lack of support of keepdims in The problem is that many ndarray subclasses do not support the keepdims arg, so we have to be careful when trying to pass it on. @njsmith's reply there made sense to me. |
I think that this super old thing is fixed now though and can probably be closed. |
Yes, thanks for the note @samuelstjean. |
I'm using numpy 1.9.2 (built locally with pip and linked to openblas) and there seems to be a strange bug with memmap. I checked through recent issues/pr and nothing seemed reported (I don't feel like building the master to check this out as I tend to stay on the same version of everything to compare results between themselves). Anyway
So the memmap doesn't play well with the keepdims=True, but the numpy array version works as expected.
The text was updated successfully, but these errors were encountered: