Skip to content

Commit

Permalink
use **kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
kif authored May 17, 2024
1 parent b64d1a5 commit 6dab338
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pyFAI/utils/mathutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,11 +931,11 @@ def interp_filter(ary, out=None):
return out


def allclose_mod(a, b, modulo=2*numpy.pi, rtol=1.e-5, atol=1.e-8, equal_nan=False):
def allclose_mod(a, b, modulo=2*numpy.pi, **kwargs):
"""Returns True if the two arrays a & b are equal within the given
tolerance modulo `modulo`; False otherwise.
Thanks to "Serguei Sokol" <[email protected]>
"""
di = numpy.minimum((a-b)%modulo, (b-a)%modulo)
return numpy.allclose(modulo*0.5, (di+modulo*0.5), rtol=rtol, atol=atol, equal_nan=equal_nan)
return numpy.allclose(modulo*0.5, (di+modulo*0.5), **kwargs)

0 comments on commit 6dab338

Please sign in to comment.