summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chroma/tools.py2
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`.'''