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

Skip to content

Let imshow handle float128 data. #8447

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
Apr 14, 2017

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Apr 8, 2017

The important parts are passing "same_kind" to can_cast (so that float128 is considered castable to float64) and converting float128 (longdouble for windows compat) back to float32 after normalization (as Agg doesn't handle float128). The rest is just small esthetic fixes.

xref #8445.

@tacaswell tacaswell added this to the 2.1 (next point release) milestone Apr 9, 2017
@tacaswell
Copy link
Member

There are too many windows failures to be transient.

@anntzer
Copy link
Contributor Author

anntzer commented Apr 9, 2017

I think I got it right this time.

Copy link
Member

@dstansby dstansby left a comment

Choose a reason for hiding this comment

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

👍

if (self._A.ndim not in (2, 3) or
(self._A.ndim == 3 and self._A.shape[-1] not in (3, 4))):
if not (self._A.ndim == 2
or self._A.ndim == 3 and self._A.shape[-1] in [3, 4]):
Copy link
Member

Choose a reason for hiding this comment

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

I think that the not should not have been dropped?

I am partial towards leaving in (), even if they are not strictly needed when they help clarity.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the boolean structure looks correct to me
i think the newline already helps with priority

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I missed the leading not when I read this before 🐑

@tacaswell tacaswell merged commit 0c9f7c2 into matplotlib:master Apr 14, 2017
@anntzer anntzer deleted the imshow-float128 branch April 14, 2017 02:25
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.

3 participants