Skip to content

Commit

Permalink
Merge pull request #81 from KaveIO/fixes_for_nixos
Browse files Browse the repository at this point in the history
FIX: numpy random multinomial requires integer number of samples
  • Loading branch information
mbaak authored Dec 30, 2023
2 parents 23b9656 + 424b709 commit e1b3d6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phik/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def sim_2d_data(hist:np.ndarray, ndata:int=0) -> np.ndarray:
"""

if ndata <= 0:
ndata = hist.sum()
ndata = int(np.rint(hist.sum()))
if ndata <= 0:
raise ValueError('ndata (or hist.sum()) has to be positive')

Expand Down

0 comments on commit e1b3d6b

Please sign in to comment.