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 0b43f83

Browse filesBrowse files
committed
Support transforming scalars as some routines need this.
1 parent 7d35c5e commit 0b43f83
Copy full SHA for 0b43f83

File tree

Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-0
lines changed

‎lib/matplotlib/transforms.py

Copy file name to clipboardExpand all lines: lib/matplotlib/transforms.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,6 +1299,9 @@ def transform(self, values):
12991299
res = self.transform_affine(self.transform_non_affine(values))
13001300

13011301
# Convert the result back to the shape of the input values.
1302+
if ndim == 0:
1303+
assert not np.ma.is_masked(res) # just to be on the safe side
1304+
return res[0, 0]
13021305
if ndim == 1:
13031306
return res.reshape(-1)
13041307
elif ndim == 2:

0 commit comments

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