From ddcbdf96244f27595b171d74e6832bbe6e2ca060 Mon Sep 17 00:00:00 2001 From: Patrick Avery Date: Mon, 12 Jun 2023 12:22:20 -0500 Subject: [PATCH] Fix warning for conversion of nan to int Signed-off-by: Patrick Avery --- hexrd/rotations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hexrd/rotations.py b/hexrd/rotations.py index 5630d1af2..c419cc29c 100644 --- a/hexrd/rotations.py +++ b/hexrd/rotations.py @@ -1422,7 +1422,7 @@ def mapAngle(ang, *args, **kwargs): angRange = atleast_1d(nFloat(args[0])) # divide of multiples of period - ang = ang - nInt(ang / period) * period + ang = ang - nInt(np.nan_to_num(ang) / period) * period lb = angRange.min() ub = angRange.max()