Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2aa71eb

Browse filesBrowse files
authored
Merge pull request #22957 from raphaelquast/fix_QuadMesh_cursor_data
fix "is" comparison for np.array
2 parents 183c0e7 + 8b97f26 commit 2aa71eb
Copy full SHA for 2aa71eb

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎lib/matplotlib/collections.py

Copy file name to clipboardExpand all lines: lib/matplotlib/collections.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2200,6 +2200,9 @@ def get_cursor_data(self, event):
22002200
if len(info["ind"]) == 1:
22012201
ind, = info["ind"]
22022202
array = self.get_array()
2203-
return array[ind] if array else None
2203+
if array is not None:
2204+
return array[ind]
2205+
else:
2206+
return None
22042207
else:
22052208
return None

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.