Skip to content

Commit

Permalink
HOTFIX: Numpy 1.19 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
andykee committed Aug 17, 2020
1 parent 96e199e commit d30fabf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
------
Expand Down
2 changes: 1 addition & 1 deletion lentil/detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d30fabf

Please sign in to comment.