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

BUG: fix incorrect printing of 1D masked arrays #7658

Merged
merged 1 commit into from
May 23, 2016

Conversation

saimn
Copy link
Contributor

@saimn saimn commented May 22, 2016

Fix for #7621. cc @charris @abalkin
#6748 added np.ma.MaskedArray._print_width which is used to cut a masked array before printing it (to save memory and cpu time during the conversion to the object dtype). But this doesn't work correctly for 1D arrays, for which up to 1000 values can be printed before cutting the array.

So this commit adds a new class variable _print_width_1d to handle the 1D case separately.

Ref numpy#7621. numpy#6748 added `np.ma.MaskedArray._print_width` which is used to cut
a masked array before printing it (to save memory and cpu time during the
conversion to the object dtype). But this doesn't work correctly for 1D arrays,
for which up to 1000 values can be printed before cutting the array.

So this commit adds a new class variable `_print_width_1d` to handle the 1D case
separately.
@charris charris added this to the 1.11.1 release milestone May 23, 2016
@charris charris merged commit 59a7b25 into numpy:master May 23, 2016
@charris charris removed this from the 1.11.1 release milestone May 23, 2016
@saimn saimn deleted the fix-ma-repr branch December 20, 2018 22:02
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.

None yet

2 participants