diff options
author | Stan Seibert <stan@mtrr.org> | 2011-11-17 14:40:14 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2021-05-09 08:42:38 -0700 |
commit | f94279eea4525802ef682b8e30c55a67fb21a150 (patch) | |
tree | 9568e888fc7d594909bc9238d2b7cef59b27898a | |
parent | b11c8399979c7494092599001a9ab013b17667c1 (diff) | |
download | chroma-f94279eea4525802ef682b8e30c55a67fb21a150.tar.gz chroma-f94279eea4525802ef682b8e30c55a67fb21a150.tar.bz2 chroma-f94279eea4525802ef682b8e30c55a67fb21a150.zip |
Cast numpy sum to Python int to make PyROOT happy.
-rw-r--r-- | chroma/tools.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chroma/tools.py b/chroma/tools.py index 2a1167e..ecfe976 100644 --- a/chroma/tools.py +++ b/chroma/tools.py @@ -6,7 +6,7 @@ import math def count_nonzero(array): '''Return the number of nonzero elements in this array''' - return (array != 0).sum() + return int((array != 0).sum()) def filled_array(value, shape, dtype): '''Create a numpy array of given `shape` and `dtype` filled with the scalar `value`.''' |