From 29af069c8b545d4fee405e85c8b0206a57059a10 Mon Sep 17 00:00:00 2001 From: "Maarten A. Breddels" Date: Fri, 7 Jul 2023 14:35:05 +0200 Subject: [PATCH] fix: comparison with None --- packages/vaex-ml/vaex/ml/transformations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vaex-ml/vaex/ml/transformations.py b/packages/vaex-ml/vaex/ml/transformations.py index 829d44adb4..cca5eaac6a 100644 --- a/packages/vaex-ml/vaex/ml/transformations.py +++ b/packages/vaex-ml/vaex/ml/transformations.py @@ -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.')