File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change
1
+ from distutils .version import LooseVersion
2
+
1
3
import numpy as np
2
4
import pytest
3
5
8
10
9
11
from . import base
10
12
11
- NP_VERSION_INFO = tuple (int (x ) for x in np .__version__ .split ('.' )[:2 ])
12
-
13
13
14
14
@pytest .fixture (params = ['float' , 'object' ])
15
15
def dtype (request ):
@@ -50,7 +50,7 @@ def data_missing(allow_in_pandas, dtype):
50
50
# For NumPy <1.16, np.array([np.nan, (1,)]) raises
51
51
# ValueError: setting an array element with a sequence.
52
52
if dtype .numpy_dtype == 'object' :
53
- if NP_VERSION_INFO < ( 1 , 16 ):
53
+ if LooseVersion ( np . __version__ ) < LooseVersion ( "1.16" ):
54
54
raise pytest .skip ("Skipping for NumPy <1.16" )
55
55
return PandasArray (np .array ([np .nan , (1 ,)]))
56
56
return PandasArray (np .array ([np .nan , 1.0 ]))
You can’t perform that action at this time.
0 commit comments