some code formatting

This commit is contained in:
2025-04-08 19:43:59 +02:00
parent 217d7862ae
commit e8ef3bd67a
7 changed files with 159 additions and 1005 deletions

View File

@@ -48,20 +48,16 @@ def _upsampled_dft(data, upsampled_region_size, upsample_factor=1, axis_offsets=
"""
# if people pass in an integer, expand it to a list of equal-sized sections
if not hasattr(upsampled_region_size, "__iter__"):
upsampled_region_size = [
upsampled_region_size,
] * data.ndim
upsampled_region_size = [upsampled_region_size] * data.ndim
else:
if len(upsampled_region_size) != data.ndim:
raise ValueError("shape of upsampled region sizes must be equal " "to input data's number of dimensions.")
raise ValueError("shape of upsampled region sizes must be equal to input data's number of dimensions.")
if axis_offsets is None:
axis_offsets = [
0,
] * data.ndim
axis_offsets = [0] * data.ndim
else:
if len(axis_offsets) != data.ndim:
raise ValueError("number of axis offsets must be equal to input " "data's number of dimensions.")
raise ValueError("number of axis offsets must be equal to input data's number of dimensions.")
im2pi = 1j * 2 * np.pi