8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9435c9 commit bc3c530Copy full SHA for bc3c530
sklearn/tree/tests/test_tree.flac
sklearn/tree/tests/test_tree.py
@@ -1619,10 +1619,12 @@ def test_criterion_copy():
1619
# Let's check whether copy of our criterion has the same type
1620
# and properties as original
1621
n_outputs = 3
1622
- n_classes = np.arange(3)
+ n_classes = np.arange(3, dtype=np.intp)
1623
n_samples = 100
1624
- pickle_copy = lambda obj: pickle.loads(pickle.dumps(obj))
1625
- for copy_func in [copy.copy, copy.deepcopy, pickle_copy]:
+
+ def _pickle_copy(obj):
1626
+ return pickle.loads(pickle.dumps(obj))
1627
+ for copy_func in [copy.copy, copy.deepcopy, _pickle_copy]:
1628
for _, typename in CRITERIA_CLF.items():
1629
criteria = typename(n_outputs, n_classes)
1630
result = copy_func(criteria).__reduce__()
0 commit comments