Skip to content

Commit

Permalink
fix float comparison to use isclose instead of exact equality
Browse files Browse the repository at this point in the history
  • Loading branch information
mperrin committed Apr 26, 2024
1 parent 959ea23 commit d20e7d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion poppy/poppy_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ def _propagate_mft(self, det):

if not np.isscalar(self.pixelscale.value):
# check for rectangular arrays
if self.pixelscale[0] == self.pixelscale[1]:
if np.isclose(self.pixelscale[0], self.pixelscale[1]):
self.pixelscale = self.pixelscale[0]
# we're in a rectangular array with same scale in both directions, so treat pixelscale as a scalar
else:
Expand Down

0 comments on commit d20e7d2

Please sign in to comment.