File tree 3 files changed +15
-3
lines changed
3 files changed +15
-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
+ 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
6
10
7
11
from sklearn .compose import make_column_transformer
8
12
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
+ try :
5
+ from scipy .integrate import trapezoid
6
+ except ImportError :
7
+ # NOTE: remove once 1.6.0 is minimum supported scipy version
8
+ from scipy .integrate import trapz as trapezoid
5
9
6
10
from sklearn .compose import make_column_transformer
7
11
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
29
+ try :
30
+ from scipy .integrate import trapezoid
31
+ except ImportError :
32
+ # NOTE: remove once 1.6.0 is minimum supported scipy version
33
+ from scipy .integrate import trapz as trapezoid
30
34
31
35
from ..exceptions import UndefinedMetricWarning
32
36
from ..preprocessing import label_binarize
You can’t perform that action at this time.
0 commit comments