@@ -86,13 +86,13 @@ def test_to_numpy_ndarray_numpy_dtypes_numeric(dtype, expected_dtype):
86
86
Test both 1-D and 2-D arrays.
87
87
"""
88
88
# 1-D array
89
- array = np .array ([1 , 2 , 3 ], dtype = dtype )
89
+ array = np .array ([1 , 2 , 3 , 4 , 5 , 6 ], dtype = dtype )[:: 2 ] # Not C-contiguous
90
90
result = _to_numpy (array )
91
91
_check_result (result , expected_dtype )
92
92
npt .assert_array_equal (result , array , strict = True )
93
93
94
94
# 2-D array
95
- array = np .array ([[1 , 2 , 3 ], [ 4 , 5 , 6 ]], dtype = dtype )
95
+ array = np .array ([[1 , 2 , 3 , 4 ], [ 5 , 6 , 7 , 8 ]], dtype = dtype )[:: 2 , :: 2 ]
96
96
result = _to_numpy (array )
97
97
_check_result (result , expected_dtype )
98
98
npt .assert_array_equal (result , array , strict = True )
@@ -132,7 +132,7 @@ def test_to_numpy_pandas_series_numpy_dtypes_numeric(dtype, expected_dtype):
132
132
"""
133
133
Test the _to_numpy function with pandas.Series of NumPy numeric dtypes.
134
134
"""
135
- series = pd .Series ([1 , 2 , 3 ], dtype = dtype )
135
+ series = pd .Series ([1 , 2 , 3 , 4 , 5 , 6 ], dtype = dtype )[:: 2 ] # Not C-contiguous
136
136
result = _to_numpy (series )
137
137
_check_result (result , expected_dtype )
138
138
npt .assert_array_equal (result , series )
0 commit comments