We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91f7796 commit e08112fCopy full SHA for e08112f
1 file changed
azint/azint.py
@@ -306,7 +306,8 @@ def integrate(self,
306
errors_2d = None
307
if self.error_model:
308
# poisson error model
309
- errors = np.sqrt(self.sparse_matrix.spmv_corrected2(img)).reshape(self.output_shape)
+ sparse = np.clip(self.sparse_matrix.spmv_corrected2(img), a_min=0, a_max=None)
310
+ errors = np.sqrt(sparse).reshape(self.output_shape)
311
if self.normalized:
312
errors = np.divide(errors, norm, out=np.zeros_like(errors), where=norm!=0.0)
313
0 commit comments