File tree 3 files changed +18
-3
lines changed
3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import numpy as np
4
4
import pytest
5
- from scipy .integrate import trapz as trapezoid
5
+
6
+ try :
7
+ from scipy .integrate import trapezoid
8
+ except ImportError :
9
+ # NOTE: remove once 1.6.0 is minimum supported scipy version
10
+ from scipy .integrate import trapz as trapezoid
6
11
7
12
from sklearn .compose import make_column_transformer
8
13
from sklearn .datasets import load_breast_cancer , make_classification
Original file line number Diff line number Diff line change 1
1
import numpy as np
2
2
import pytest
3
3
from numpy .testing import assert_allclose
4
- from scipy .integrate import trapz as trapezoid
4
+
5
+ try :
6
+ from scipy .integrate import trapezoid
7
+ except ImportError :
8
+ # NOTE: remove once 1.6.0 is minimum supported scipy version
9
+ from scipy .integrate import trapz as trapezoid
5
10
6
11
from sklearn .compose import make_column_transformer
7
12
from sklearn .datasets import load_breast_cancer , load_iris
Original file line number Diff line number Diff line change 24
24
from numbers import Integral , Real
25
25
26
26
import numpy as np
27
- from scipy .integrate import trapz as trapezoid
28
27
from scipy .sparse import csr_matrix , issparse
29
28
from scipy .stats import rankdata
30
29
30
+ try :
31
+ from scipy .integrate import trapezoid
32
+ except ImportError :
33
+ # NOTE: remove once 1.6.0 is minimum supported scipy version
34
+ from scipy .integrate import trapz as trapezoid
35
+
31
36
from ..exceptions import UndefinedMetricWarning
32
37
from ..preprocessing import label_binarize
33
38
from ..utils import (
You can’t perform that action at this time.
0 commit comments