Skip to content

Commit d1be7f7

Browse files
authored
Merge pull request #22963 from meeseeksmachine/auto-backport-of-pr-22957-on-v3.5.x
Backport PR #22957 on branch v3.5.x (fix "is" comparison for np.array)
2 parents 25c1c3d + f9fe06b commit d1be7f7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/collections.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -2212,6 +2212,9 @@ def get_cursor_data(self, event):
22122212
if len(info["ind"]) == 1:
22132213
ind, = info["ind"]
22142214
array = self.get_array()
2215-
return array[ind] if array else None
2215+
if array is not None:
2216+
return array[ind]
2217+
else:
2218+
return None
22162219
else:
22172220
return None

0 commit comments

Comments
 (0)