Skip to content

Commit

Permalink
Fix deprecated code for new version of polars
Browse files Browse the repository at this point in the history
  • Loading branch information
qubixes authored Feb 2, 2023
1 parent 108b87c commit c17666e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metasynth/distribution/continuous.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def __init__(self, rate: float):

@classmethod
def _fit(cls, values):
values = values[values > 0]
values = values.filter(values > 0)
if len(values) == 0:
return cls.default_distribution()
return cls(rate=1/expon.fit(values, floc=0)[1])
Expand Down

0 comments on commit c17666e

Please sign in to comment.