Skip to content

Commit ea757b6

Browse files
committed
Variable: Fix arg 'number_of_decimals' in ContinuousVariable.copy
1 parent ac4b66d commit ea757b6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Orange/data/variable.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -556,9 +556,11 @@ def repr_val(self, val):
556556
str_val = repr_val
557557

558558
def copy(self, compute_value=None, *, name=None, **kwargs):
559-
var = super().copy(compute_value=compute_value, name=name,
560-
number_of_decimals=self.number_of_decimals,
561-
**kwargs)
559+
var = super().copy(
560+
compute_value=compute_value, name=name,
561+
number_of_decimals=kwargs.pop("number_of_decimals",
562+
self.number_of_decimals),
563+
**kwargs)
562564
var.adjust_decimals = self.adjust_decimals
563565
var.format_str = self._format_str
564566
return var

0 commit comments

Comments
 (0)