diff --git a/CHANGES.rst b/CHANGES.rst index ed3fd98..74df521 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,7 @@ v0.3.3 Released August 17, 2020 * Make FPN seed optional in ``detector.dark_current`` +* Update ``np.ediff1d`` usage to be compatible with Numpy 1.19 v0.3.2 ------ diff --git a/lentil/detector.py b/lentil/detector.py index ca1395c..77ccd4a 100644 --- a/lentil/detector.py +++ b/lentil/detector.py @@ -829,7 +829,7 @@ def _process_cube_intersections(inter, xyz, dxdydz): _dxdydz = dxdydz[inter['indx'], :].astype(np.float32) draylength = np.ediff1d(inter['raylength'], to_begin=(0.0,)) - np.putmask(draylength, np.ediff1d(inter['indx'], to_begin=(1,)) != 0, + np.putmask(draylength, np.ediff1d(inter['indx'], to_begin=np.array([1], dtype=np.uint64)) != 0, inter['raylength']) inter_point = _xyz + inter['raylength'][:, None] * _dxdydz