Skip to content

Commit 61ab072

Browse files
committed
Added weights option to fillnumpy function
1 parent 0daedc3 commit 61ab072

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

histogrammar/defs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,9 +1351,9 @@ def _c99StorageType(self):
13511351
def _cudaStorageType(self):
13521352
return self._c99StructName()
13531353

1354-
def fillnumpy(self, data):
1354+
def fillnumpy(self, data, weights=1.0):
13551355
self._checkForCrossReferences()
1356-
self._numpy(data, 1.0, [None])
1356+
self._numpy(data, weights, shape=[None])
13571357

13581358
def _checkNPQuantity(self, q, shape):
13591359
import numpy

histogrammar/primitives/count.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def _cudaUnpackAndFill(self, data, bigendian, alignment):
207207
def _cudaStorageType(self):
208208
return "float"
209209

210-
def _numpy(self, data, weights, shape):
210+
def _numpy(self, _, weights, shape):
211211
import numpy
212212
if isinstance(weights, numpy.ndarray):
213213
assert len(weights.shape) == 1

0 commit comments

Comments
 (0)