unxts.interop.matplotlib 2.0.0__tar.gz → 2.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {unxts_interop_matplotlib-2.0.0 → unxts_interop_matplotlib-2.0.1}/PKG-INFO +2 -2
- {unxts_interop_matplotlib-2.0.0 → unxts_interop_matplotlib-2.0.1}/pyproject.toml +1 -0
- {unxts_interop_matplotlib-2.0.0 → unxts_interop_matplotlib-2.0.1}/src/unxts/interop/matplotlib/_version.py +2 -2
- {unxts_interop_matplotlib-2.0.0 → unxts_interop_matplotlib-2.0.1}/tests/test_converter.py +22 -0
- {unxts_interop_matplotlib-2.0.0 → unxts_interop_matplotlib-2.0.1}/.gitignore +0 -0
- {unxts_interop_matplotlib-2.0.0 → unxts_interop_matplotlib-2.0.1}/LICENSE +0 -0
- {unxts_interop_matplotlib-2.0.0 → unxts_interop_matplotlib-2.0.1}/README.md +0 -0
- {unxts_interop_matplotlib-2.0.0 → unxts_interop_matplotlib-2.0.1}/docs/api.md +0 -0
- {unxts_interop_matplotlib-2.0.0 → unxts_interop_matplotlib-2.0.1}/docs/guide.md +0 -0
- {unxts_interop_matplotlib-2.0.0 → unxts_interop_matplotlib-2.0.1}/docs/index.md +0 -0
- {unxts_interop_matplotlib-2.0.0 → unxts_interop_matplotlib-2.0.1}/src/unxts/interop/matplotlib/__init__.py +0 -0
- {unxts_interop_matplotlib-2.0.0 → unxts_interop_matplotlib-2.0.1}/src/unxts/interop/matplotlib/_src/__init__.py +0 -0
- {unxts_interop_matplotlib-2.0.0 → unxts_interop_matplotlib-2.0.1}/src/unxts/interop/matplotlib/_src/converter.py +0 -0
- {unxts_interop_matplotlib-2.0.0 → unxts_interop_matplotlib-2.0.1}/src/unxts/interop/matplotlib/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: unxts.interop.matplotlib
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: matplotlib integration for unxt (canonical: unxts.interop.matplotlib)
|
|
5
5
|
Project-URL: Bug Tracker, https://github.com/GalacticDynamics/unxt/issues
|
|
6
6
|
Project-URL: Homepage, https://github.com/GalacticDynamics/unxt
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '2.0.
|
|
22
|
-
__version_tuple__ = version_tuple = (2, 0,
|
|
21
|
+
__version__ = version = '2.0.1'
|
|
22
|
+
__version_tuple__ = version_tuple = (2, 0, 1)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -47,3 +47,25 @@ def test_imshow_with_quantity_extent():
|
|
|
47
47
|
assert "mas" in ax.get_xlabel()
|
|
48
48
|
finally:
|
|
49
49
|
plt.close(fig)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def test_default_units_from_a_quantity():
|
|
53
|
+
"""A quantity carries its own unit; no unwrapping needed."""
|
|
54
|
+
converter = uimpl.UnxtConverter()
|
|
55
|
+
assert converter.default_units(u.Q([1.0, 2.0], "mas"), None) == u.unit("mas")
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def test_default_units_of_a_bare_scalar_is_none():
|
|
59
|
+
"""A plain scalar has no unit and is not iterable."""
|
|
60
|
+
converter = uimpl.UnxtConverter()
|
|
61
|
+
assert converter.default_units(1.0, None) is None
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def test_setup_can_be_disabled_and_re_enabled():
|
|
65
|
+
"""Disabling removes the converter from matplotlib's registry."""
|
|
66
|
+
try:
|
|
67
|
+
uimpl.setup_matplotlib_support_for_unxt(enable=False)
|
|
68
|
+
assert u.quantity.AbstractQuantity not in matplotlib.units.registry
|
|
69
|
+
finally:
|
|
70
|
+
uimpl.setup_matplotlib_support_for_unxt()
|
|
71
|
+
assert u.quantity.AbstractQuantity in matplotlib.units.registry
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|