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

Review use of numpy array print formats, and Python2/3 variation #3138

Closed
2 tasks
pp-mo opened this issue Aug 13, 2018 · 2 comments
Closed
2 tasks

Review use of numpy array print formats, and Python2/3 variation #3138

pp-mo opened this issue Aug 13, 2018 · 2 comments

Comments

@pp-mo
Copy link
Member

pp-mo commented Aug 13, 2018

Iris tests need a stable array print format when comparing text results:

  • in doctests, and
  • within assertCML testing.

This caused considerable difficulties when adding Matplotlib 2 support.
See : #3019 (comment)

Recently this happens again, since numpy 1.15 (?probably).
We now have different printouts in Python 2 and Python 3.
See : #3134
N.B. I think this does not relate to use of the 'legacy' option, As this only has effect in printing Iris objects. Whereas, the docstring incompatibility encountered in #3134, e.g. between travis test 8514.7 and 8514.8 here, happens when just printing arrays.

TODO:

  • see if there is anything better we can do here
  • see if this is a mistake in numpy, or if they just don't care about this kind of difference
@rcomer
Copy link
Member

rcomer commented May 7, 2021

I'm not sure if this issue is still relevant as it mentions python 2. If it is still relevant, would use of numpy.set_printoptions help?

@pp-mo
Copy link
Member Author

pp-mo commented May 10, 2021

I think this was actually addressed, in much the way you suggest.
So I judge this was not just not linked and should have been closed.

Thanks for looking!
👀 ❤️

@pp-mo pp-mo closed this as completed May 10, 2021
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

No branches or pull requests

2 participants