Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make sure int values of boxlength are converted to floats #67

Merged
merged 6 commits into from
Aug 2, 2024
4 changes: 3 additions & 1 deletion src/powerbox/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,9 @@
dim = len(deltax.shape)

if not np.iterable(boxlength):
boxlength = [boxlength] * dim
boxlength = [boxlength + 0.0] * dim
else:
boxlength = [val + 0.0 for val in boxlength]

Check warning on line 1125 in src/powerbox/tools.py

View check run for this annotation

Codecov / codecov/patch

src/powerbox/tools.py#L1125

Added line #L1125 was not covered by tests

if deltax2 is not None and deltax.shape != deltax2.shape:
raise ValueError("deltax and deltax2 must have the same shape!")
Expand Down
Loading