-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: patch opticks for incorrect numpy dtype (#81)
- Loading branch information
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
patches/opticks-fix-update-array-dtype-for-numpy-1.26.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From 3c2a0ac17c2fb6d00cb08c2e7add4660642e8c46 Mon Sep 17 00:00:00 2001 | ||
From: Dmitri Smirnov <dmixsmi@gmail.com> | ||
Date: Fri, 24 May 2024 12:41:09 -0400 | ||
Subject: [PATCH] fix: update array dtype for numpy >= 1.26 | ||
|
||
--- | ||
sysrap/sevt.py | 6 +++--- | ||
1 file changed, 3 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/sysrap/sevt.py b/sysrap/sevt.py | ||
index 191926c34..a67de5d7e 100644 | ||
--- a/sysrap/sevt.py | ||
+++ b/sysrap/sevt.py | ||
@@ -380,13 +380,13 @@ class SEvt(object): | ||
qtab = eval(qtab_) | ||
qtab_ = qtab_.replace("q","%s.q" % symbol) | ||
|
||
- nosc = np.ones(len(qq), dtype=np.bool ) # start all true | ||
+ nosc = np.ones(len(qq), dtype=bool ) # start all true | ||
nosc[np.where(qq == pcf.SC)[0]] = 0 # knock out photons with scatter in their histories | ||
|
||
- nore = np.ones(len(qq), dtype=np.bool ) # start all true | ||
+ nore = np.ones(len(qq), dtype=bool ) # start all true | ||
nore[np.where(qq == pcf.RE)[0]] = 0 # knock out photons with reemission in their histories | ||
|
||
- noscab = np.ones(len(qq), dtype=np.bool ) # start all true | ||
+ noscab = np.ones(len(qq), dtype=bool ) # start all true | ||
noscab[np.where(qq == pcf.SC)[0]] = 0 # knock out photons with scatter in their histories | ||
noscab[np.where(qq == pcf.AB)[0]] = 0 # knock out photons with bulk absorb in their histories | ||
else: | ||
-- | ||
2.39.3 | ||
|