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

On armv7hl, some get_cursor_data calls return 0 instead of None. #6538

Closed
rathann opened this issue Jun 5, 2016 · 5 comments

Comments

Projects
None yet
5 participants
@rathann
Copy link

commented Jun 5, 2016

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 ...)

1.5.2rc2, 2.7.11/3.5.1, Fedora rawhide

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

From source (building a new version of Fedora package).

  • If possible please supply a Short, Self Contained, Correct, Example
    that demonstrates the issue i.e a small piece of code which reproduces the issue
    and can be run with out any other (or as few as possible) external dependencies.

The following three tests fail due to get_cursor_data() calls returning 0 instead of None.

diff -up matplotlib-1.5.1/lib/matplotlib/tests/test_image.py.tests matplotlib-1.5.1/lib/matplotlib/tests/test_image.py
--- matplotlib-1.5.1/lib/matplotlib/tests/test_image.py.tests   2016-05-23 14:04:41.000000000 +0200
+++ matplotlib-1.5.1/lib/matplotlib/tests/test_image.py 2016-06-02 00:28:37.076703843 +0200
@@ -186,7 +186,8 @@ def test_cursor_data():

     event = MouseEvent('motion_notify_event', fig.canvas, xdisp, ydisp)
     z = im.get_cursor_data(event)
-    assert z is None, "Did not get None, got %d" % z
+    #0 instead of None on armv7hl
+    #assert z is None, "Did not get None, got %d" % z

     # Hmm, something is wrong here... I get 0, not None...
     # But, this works further down in the tests with extents flipped
@@ -224,14 +225,16 @@ def test_cursor_data():

     event = MouseEvent('motion_notify_event', fig.canvas, xdisp, ydisp)
     z = im.get_cursor_data(event)
-    assert z is None, "Did not get None, got %d" % z
+    #0 instead of None on armv7hl
+    #assert z is None, "Did not get None, got %d" % z

     x, y = 0.01, -0.01
     xdisp, ydisp = ax.transData.transform_point([x, y])

     event = MouseEvent('motion_notify_event', fig.canvas, xdisp, ydisp)
     z = im.get_cursor_data(event)
-    assert z is None, "Did not get None, got %d" % z
+    #0 instead of None on armv7hl
+    #assert z is None, "Did not get None, got %d" % z


 @image_comparison(baseline_images=['image_clip'])

@tacaswell tacaswell added this to the 2.0 (style change major release) milestone Jun 6, 2016

@tacaswell

This comment has been minimized.

Copy link
Member

commented Jun 6, 2016

We see this from the debian build on arm as well.

@story645 story645 added the Testing label Jun 16, 2016

@tacaswell tacaswell modified the milestones: 2.0.1 (next bug fix release), 2.0 (style change major release) Jul 12, 2016

@tacaswell

This comment has been minimized.

Copy link
Member

commented Jul 12, 2016

re-milestoned, this is not a blocking issue for 2.0

@rathann

This comment has been minimized.

Copy link
Author

commented Sep 22, 2016

FYI, this is reproducible with 2.0.0b4 on armv7hl (ARMv7 HFP) and aarch64 (ARM v8) as well.

@QuLogic QuLogic modified the milestones: 2.0.1 (next bug fix release), 2.0.2 (next bug fix release) May 3, 2017

QuLogic added a commit to QuLogic/matplotlib that referenced this issue Oct 7, 2017

Fix AxesImage.get_cursor_data on arm.
For some reason, NaN gets converted to 0 as an integer instead of
INT_MIN like on x86.

Fixes matplotlib#6538.

QuLogic added a commit to QuLogic/matplotlib that referenced this issue Oct 16, 2017

Fix AxesImage.get_cursor_data on arm.
For some reason, NaN gets converted to 0 as an integer instead of
INT_MIN like on x86.

Fixes matplotlib#6538.
@tacaswell

This comment has been minimized.

Copy link
Member

commented Oct 21, 2017

#9304 has a patch for this.

@dopplershift

This comment has been minimized.

Copy link
Contributor

commented Oct 23, 2017

Fixed by #9304.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.