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
2 of 3 tasks
rathann opened this issue Jun 5, 2016 · 5 comments
Closed
2 of 3 tasks

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

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

Comments

@rathann
Copy link

rathann 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
Copy link
Member

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

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

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

@rathann
Copy link
Author

rathann 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
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
For some reason, NaN gets converted to 0 as an integer instead of
INT_MIN like on x86.

Fixes matplotlib#6538.
@tacaswell
Copy link
Member

#9304 has a patch for this.

@dopplershift
Copy link
Contributor

Fixed by #9304.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants