Skip to content

MAINT: Tidy up Maskedarray repr #9913

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 3 commits into from
Oct 25, 2017

Conversation

eric-wieser
Copy link
Member

Extracted from #9792, contains part of #9202 as well

Copy link
Contributor

@mhvk mhvk left a comment

Choose a reason for hiding this comment

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

Yes, good to get this in. One small comment only.

numpy/ma/core.py Outdated
@@ -3829,10 +3833,10 @@ def compress(self, condition, axis=None, out=None):
_new._mask = _mask.compress(condition, axis=axis)
return _new

def __str__(self):
def __insert_masked_print(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

Only seeing this on this second reading, but I would make this "semi-private", i.e., a single underscore, partly just because it seems something people might want to call, but mostly since we don't use the class mangling much elsewhere in numpy

Copy link
Member

Choose a reason for hiding this comment

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

we don't use the class mangling much elsewhere in numpy

We give the users great power, they have to provide the great responsibility :)

@eric-wieser I'll make the change and merge if that is OK with you.

Copy link
Member Author

Choose a reason for hiding this comment

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

Go ahead.

@charris charris merged commit 1e494f1 into numpy:master Oct 25, 2017
@charris
Copy link
Member

charris commented Oct 25, 2017

Thanks Eric.

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