Skip to content

Commit

Permalink
fix: comparison with None
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Jul 7, 2023
1 parent b5d992c commit 29af069
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vaex-ml/vaex/ml/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def _valid_eps(self, proposal):

@traitlets.validate('density')
def _valid_density(self, proposal):
if (proposal['value'] > 0) & (proposal['value'] <= 1):
if proposal['value'] is None or (proposal['value'] > 0) & (proposal['value'] <= 1):
return proposal['value']
else:
raise traitlets.TraitError('`density` must be 0 < density <= 1.')
Expand Down

0 comments on commit 29af069

Please sign in to comment.