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 fde35d4

Browse filesBrowse files
authored
Merge pull request #24758 from oscargus/masked
MNT: Simplify code related to masked arrays
2 parents a668754 + 8cd356a commit fde35d4
Copy full SHA for fde35d4

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed

‎lib/matplotlib/ticker.py

Copy file name to clipboardExpand all lines: lib/matplotlib/ticker.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ def set_powerlimits(self, lims):
623623

624624
def format_data_short(self, value):
625625
# docstring inherited
626-
if isinstance(value, np.ma.MaskedArray) and value.mask:
626+
if value is np.ma.masked:
627627
return ""
628628
if isinstance(value, Integral):
629629
fmt = "%d"

‎lib/matplotlib/transforms.py

Copy file name to clipboardExpand all lines: lib/matplotlib/transforms.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1854,7 +1854,7 @@ def transform_affine(self, points):
18541854
# The major speed trap here is just converting to the
18551855
# points to an array in the first place. If we can use
18561856
# more arrays upstream, that should help here.
1857-
if not isinstance(points, (np.ma.MaskedArray, np.ndarray)):
1857+
if not isinstance(points, np.ndarray):
18581858
_api.warn_external(
18591859
f'A non-numpy array of type {type(points)} was passed in '
18601860
f'for transformation, which results in poor performance.')

0 commit comments

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