Skip to content

test_colors.test_Normalize fails in 2.0.0b4 on Fedora rawhide/aarch64 (ARMv8) #7159

Closed

Description

@rathann

To help us understand and resolve your issue please check that you have provided
the information below.

  • Matplotlib version, Python version and Platform (Windows, OSX, Linux ...)

    2.0.0b4, python-2.7.12-6.fc26, python-3.5.2-4.fc26, Fedora rawhide/aarch64 (ARMv8)

  • How did you install Matplotlib and Python (pip, anaconda, from source ...)

    matplotlib from source, python from system packages

======================================================================
FAIL: matplotlib.tests.test_colors.test_Normalize
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-matplotlib-2.0.0-0.1.b4.fc26.aarch64/usr/lib64/python2.7/site-packages/matplotlib/tests/test_colors.py", line 210, in test_Normalize
    assert_equal(norm(1 + 50 * eps), .5)
AssertionError: 0.50096339113680154143 != 0.5

Activity

  1. added this to the milestone on Sep 22, 2016
  2. tacaswell commented on Sep 22, 2016

    @tacaswell
    Member

    attn @anntzer I think you wrote this test.

    It looks like this is explicitly a test of longdouble

    eps = np.finfo(np.longdouble).resolution
    norm = plt.Normalize(1, 1 + 100 * eps)
    assert_equal(norm(1 + 50 * eps), .5)

    which I assume is supported differently on ARM than on x86_64.

    My gut reaction is that we need some sort of conditional here to not bother testing longdouble/float128 in ARM, but I do not know enough about ARM to be sure.

  3. anntzer commented on Sep 22, 2016

    @anntzer
    Contributor

    @rathann what does np.finfo(np.longdouble) return for you?
    @tacaswell see #6700 for the origin of the test, I think (not very strongly) that the fix belongs in 2.0.

  4. rathann commented on Sep 22, 2016

    @rathann
    Author

    @anntzer here's what I got from a fellow Fedora developer:
    finfo(resolution=1e-33, min=-1.18973149536e+4932, max=1.18973149536e+4932, dtype=float128)

  5. anntzer commented on Sep 22, 2016

    @anntzer
    Contributor

    Ugh, so at least this is not different from what I have here.
    Similarly to #7158 I think a VM image would be the best way to investigate this.

    Edit: see below.

  6. QuLogic commented on Sep 22, 2016

    @QuLogic
    Member

    @anntzer It's really the same for you?

    On x86_64, I get finfo(resolution=1e-18, min=-1.18973149536e+4932, max=1.18973149536e+4932, dtype=float128) which has a much bigger resolution value.

  7. anntzer commented on Sep 22, 2016

    @anntzer
    Contributor

    Oops, didn't pay attention to the resolution. I get the same thing as @QuLogic, so yes, my resolution us much lower.
    Actually 1e-33 looks "real" float128 instead of the "extended precision" (80 bits) we have on x86_64 (=1e-18).

    The test computes ((1+50*eps)-1) / ((1+100*eps)-1) where eps is the resolution given. I think it's fair to let it pass as long as the result is between 0.495 and 0.505 (off by 1%, which should correspond to the 100*eps). (The purpose of the test was mostly to make sure that the 100*eps doesn't get eaten away when eps is smaller than the resolution of float64.) Thoughts?

  8. Kojoley commented on Sep 22, 2016

    @Kojoley
    Member

    Maybe just assert norm(1 + np.finfo(np.longdouble).eps) > 1 is enough?

  9. anntzer commented on Sep 30, 2016

    @anntzer
    Contributor

    Should be fixed by #7167, please request a reopen otherwise.

  10. modified the milestones: , on Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions