Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: Fixed masked array behavior for scalar inputs to np.ma.atleast_*d #7823

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

Merged
merged 1 commit into from
Aug 27, 2016

Conversation

madphysicist
Copy link
Contributor

The changes in this bug are extracted from #7804, where they are duplicated. This PR is intended to be non-controversial since it is just a bug-fix.

def __call__(self, x, *args, **params):
func = getattr(np, self.__name__)
_d = func(tuple([np.asarray(a) for a in x]), *args, **params)
_m = func(tuple([getmaskarray(a) for a in x]), *args, **params)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the list should not be needed, you can create a tuple from a generator (though it doesn't really make a significant difference here)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a direct copy of old version line ~272. I thought there were some issues with using a generator expression in older versions of Python, so I kept it this way. Could be wrong though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we only support 2.6 (or even 2.7 now?) so that should not be an issue
but its also not necessary to change it, more of a keep in mind that you can do that comment :)

@juliantaylor juliantaylor merged commit f12412d into numpy:master Aug 27, 2016
@juliantaylor
Copy link
Contributor

thanks

@homu homu mentioned this pull request Aug 27, 2016
@madphysicist madphysicist deleted the ma-bugs branch August 29, 2016 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants