Skip to content

Commit d9ae387

Browse files
authored
Merge pull request #16508 from anntzer/unsep
Multi-dim transforms are non-separable by default.
2 parents bd87ec8 + 01c4235 commit d9ae387

File tree

4 files changed

+8
-24
lines changed

4 files changed

+8
-24
lines changed

examples/misc/custom_projection.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -374,12 +374,8 @@ class HammerAxes(GeoAxes):
374374
name = 'custom_hammer'
375375

376376
class HammerTransform(Transform):
377-
"""
378-
The base Hammer transform.
379-
"""
380-
input_dims = 2
381-
output_dims = 2
382-
is_separable = False
377+
"""The base Hammer transform."""
378+
input_dims = output_dims = 2
383379

384380
def __init__(self, resolution):
385381
"""
@@ -412,9 +408,7 @@ def inverted(self):
412408
return HammerAxes.InvertedHammerTransform(self._resolution)
413409

414410
class InvertedHammerTransform(Transform):
415-
input_dims = 2
416-
output_dims = 2
417-
is_separable = False
411+
input_dims = output_dims = 2
418412

419413
def __init__(self, resolution):
420414
Transform.__init__(self)

lib/matplotlib/projections/geo.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,7 @@ def drag_pan(self, button, key, x, y):
228228

229229
class _GeoTransform(Transform):
230230
# Factoring out some common functionality.
231-
input_dims = 2
232-
output_dims = 2
233-
is_separable = False
231+
input_dims = output_dims = 2
234232

235233
def __init__(self, resolution):
236234
"""

lib/matplotlib/projections/polar.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ class PolarTransform(mtransforms.Transform):
2121
perform the ultimate affine transformation into the correct
2222
position.
2323
"""
24-
input_dims = 2
25-
output_dims = 2
26-
is_separable = False
24+
input_dims = output_dims = 2
2725

2826
def __init__(self, axis=None, use_rmin=True,
2927
_apply_theta_transforms=True):
@@ -102,9 +100,7 @@ class InvertedPolarTransform(mtransforms.Transform):
102100
The inverse of the polar transform, mapping Cartesian
103101
coordinate space *x* and *y* back to *theta* and *r*.
104102
"""
105-
input_dims = 2
106-
output_dims = 2
107-
is_separable = False
103+
input_dims = output_dims = 2
108104

109105
def __init__(self, axis=None, use_rmin=True,
110106
_apply_theta_transforms=True):

lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@
2020
tol={'aarch64': 0.034}.get(platform.machine(), 0.03))
2121
def test_custom_transform():
2222
class MyTransform(Transform):
23-
input_dims = 2
24-
output_dims = 2
25-
is_separable = False
23+
input_dims = output_dims = 2
2624

2725
def __init__(self, resolution):
2826
"""
@@ -48,9 +46,7 @@ def inverted(self):
4846
return MyTransformInv(self._resolution)
4947

5048
class MyTransformInv(Transform):
51-
input_dims = 2
52-
output_dims = 2
53-
is_separable = False
49+
input_dims = output_dims = 2
5450

5551
def __init__(self, resolution):
5652
Transform.__init__(self)

0 commit comments

Comments
 (0)