From c6fde8b7177d8be43a2f265f328bb12d4c70a2b3 Mon Sep 17 00:00:00 2001 From: Tara Mishra Date: Tue, 25 Oct 2022 17:07:58 -0700 Subject: [PATCH 1/6] Fix pint for brc --- hyperspy/misc/axis_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyperspy/misc/axis_tools.py b/hyperspy/misc/axis_tools.py index 660cb738d9..21cfc124e8 100644 --- a/hyperspy/misc/axis_tools.py +++ b/hyperspy/misc/axis_tools.py @@ -17,7 +17,7 @@ import numpy as np -from pint.unit import Unit +from pint import Unit def check_axes_calibration(ax1, ax2, rtol=1e-7): From c8b996842e87f671a5cb8059bcee243ce1749935 Mon Sep 17 00:00:00 2001 From: Tara Mishra Date: Fri, 28 Oct 2022 15:45:03 -0700 Subject: [PATCH 2/6] using _ureg internal Unit as Units --- hyperspy/misc/axis_tools.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hyperspy/misc/axis_tools.py b/hyperspy/misc/axis_tools.py index 21cfc124e8..61d27aa91c 100644 --- a/hyperspy/misc/axis_tools.py +++ b/hyperspy/misc/axis_tools.py @@ -17,8 +17,8 @@ import numpy as np -from pint import Unit - +#from pint import Unit +from hyperspy.api_nogui import _ureg def check_axes_calibration(ax1, ax2, rtol=1e-7): """Check if the calibration of two Axis objects matches. @@ -43,12 +43,12 @@ def check_axes_calibration(ax1, ax2, rtol=1e-7): """ if ax1.size == ax2.size: try: - unit1 = Unit(ax1.units) + unit1 = _ureg.Unit(ax1.units) except: unit1 = ax1.units try: unit2 = ax2.units - unit2 = Unit(ax2.units) + unit2 = _ureg.Unit(ax2.units) except: pass if np.allclose(ax1.axis, ax2.axis, atol=0, rtol=rtol) and unit1 == unit2: From 052e68c0896a87e531c8803ff3b1b68ef84fbc52 Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Sat, 29 Oct 2022 11:06:52 +0100 Subject: [PATCH 3/6] Add changelog entry and clean up commented import --- hyperspy/misc/axis_tools.py | 4 ++-- upcoming_changes/3052.bugfix.rst | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 upcoming_changes/3052.bugfix.rst diff --git a/hyperspy/misc/axis_tools.py b/hyperspy/misc/axis_tools.py index 61d27aa91c..c4f831273e 100644 --- a/hyperspy/misc/axis_tools.py +++ b/hyperspy/misc/axis_tools.py @@ -17,8 +17,8 @@ import numpy as np -#from pint import Unit -from hyperspy.api_nogui import _ureg +from hyperspy.api_nogui import _ureg + def check_axes_calibration(ax1, ax2, rtol=1e-7): """Check if the calibration of two Axis objects matches. diff --git a/upcoming_changes/3052.bugfix.rst b/upcoming_changes/3052.bugfix.rst new file mode 100644 index 0000000000..2ca3eed9ef --- /dev/null +++ b/upcoming_changes/3052.bugfix.rst @@ -0,0 +1 @@ +Fix pint Unit for pint>=0.20 \ No newline at end of file From 9799240cc095a1ea5909b93c3589d4c3a2eebbd6 Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Sat, 29 Oct 2022 11:30:42 +0100 Subject: [PATCH 4/6] Set hyperspy version to 1.7.3 --- hyperspy/Release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyperspy/Release.py b/hyperspy/Release.py index 280ddc03f6..b84e48a783 100644 --- a/hyperspy/Release.py +++ b/hyperspy/Release.py @@ -25,7 +25,7 @@ # When running setup.py the ".dev" string will be replaced (if possible) # by the output of "git describe" if git is available or the git # hash if .git is present. -version = "1.7.3.dev0" +version = "1.7.3" __version__ = version description = "Multidimensional data analysis toolbox" license = 'GPL v3' From ec2e8d5fa3d02f5daa1bc26a8eed09d36bc260cc Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Sat, 29 Oct 2022 11:32:14 +0100 Subject: [PATCH 5/6] Update changelog by running `towncrier build` --- CHANGES.rst | 18 ++++++++++++++++++ upcoming_changes/3032.maintenance.rst | 1 - upcoming_changes/3033.maintenance..rst | 1 - upcoming_changes/3040.bugfix.rst | 1 - upcoming_changes/3049.maintenance.rst | 1 - upcoming_changes/3052.bugfix.rst | 1 - 6 files changed, 18 insertions(+), 5 deletions(-) delete mode 100644 upcoming_changes/3032.maintenance.rst delete mode 100644 upcoming_changes/3033.maintenance..rst delete mode 100644 upcoming_changes/3040.bugfix.rst delete mode 100644 upcoming_changes/3049.maintenance.rst delete mode 100644 upcoming_changes/3052.bugfix.rst diff --git a/CHANGES.rst b/CHANGES.rst index 0a9aadd34a..097cb7f32d 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,6 +8,24 @@ https://hyperspy.readthedocs.io/en/latest/user_guide/changes.html .. towncrier release notes start +Hyperspy 1.7.3 (2022-10-29) +=========================== + +Bug Fixes +--------- + +- Fix error when reading Velox containing FFT with odd number of pixels (`#3040 `_) +- Fix pint Unit for pint>=0.20 (`#3052 `_) + + +Maintenance +----------- + +- Fix deprecated import of scipy ``ascent`` in docstrings and the test suite (`#3032 `_) +- Fix error handling when trying to convert a ragged signal to non-ragged for numpy >=1.24 (`#3033 `_) +- Fix getting random state dask for dask>=2022.10.0 (`#3049 `_) + + Hyperspy 1.7.2 (2022-09-17) =========================== diff --git a/upcoming_changes/3032.maintenance.rst b/upcoming_changes/3032.maintenance.rst deleted file mode 100644 index a0abcd1caa..0000000000 --- a/upcoming_changes/3032.maintenance.rst +++ /dev/null @@ -1 +0,0 @@ -Fix deprecated import of scipy ``ascent`` in docstrings and the test suite \ No newline at end of file diff --git a/upcoming_changes/3033.maintenance..rst b/upcoming_changes/3033.maintenance..rst deleted file mode 100644 index 7f29eb30a5..0000000000 --- a/upcoming_changes/3033.maintenance..rst +++ /dev/null @@ -1 +0,0 @@ -Fix error handling when trying to convert a ragged signal to non-ragged for numpy >=1.24 \ No newline at end of file diff --git a/upcoming_changes/3040.bugfix.rst b/upcoming_changes/3040.bugfix.rst deleted file mode 100644 index 4ba410420e..0000000000 --- a/upcoming_changes/3040.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix error when reading Velox containing FFT with odd number of pixels \ No newline at end of file diff --git a/upcoming_changes/3049.maintenance.rst b/upcoming_changes/3049.maintenance.rst deleted file mode 100644 index a3f91b0921..0000000000 --- a/upcoming_changes/3049.maintenance.rst +++ /dev/null @@ -1 +0,0 @@ -Fix getting random state dask for dask>=2022.10.0 \ No newline at end of file diff --git a/upcoming_changes/3052.bugfix.rst b/upcoming_changes/3052.bugfix.rst deleted file mode 100644 index 2ca3eed9ef..0000000000 --- a/upcoming_changes/3052.bugfix.rst +++ /dev/null @@ -1 +0,0 @@ -Fix pint Unit for pint>=0.20 \ No newline at end of file From e0b29dfd92920adc180c825eed69f6195d7dc7e6 Mon Sep 17 00:00:00 2001 From: Eric Prestat Date: Sat, 29 Oct 2022 12:16:23 +0100 Subject: [PATCH 6/6] Set hyperspy version back to dev (1.7.4.dev0) --- hyperspy/Release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyperspy/Release.py b/hyperspy/Release.py index b84e48a783..de95d34a20 100644 --- a/hyperspy/Release.py +++ b/hyperspy/Release.py @@ -25,7 +25,7 @@ # When running setup.py the ".dev" string will be replaced (if possible) # by the output of "git describe" if git is available or the git # hash if .git is present. -version = "1.7.3" +version = "1.7.4.dev0" __version__ = version description = "Multidimensional data analysis toolbox" license = 'GPL v3'