@@ -115,9 +115,9 @@ def test_to_numpy_python_types(data, expected_dtype):
115
115
116
116
117
117
@pytest .mark .parametrize (("dtype" , "expected_dtype" ), np_dtype_params )
118
- def test_to_numpy_ndarray_numpy_dtypes_numeric (dtype , expected_dtype ):
118
+ def test_to_numpy_numpy_numeric (dtype , expected_dtype ):
119
119
"""
120
- Test the _to_numpy function with NumPy arrays of NumPy numeric dtypes.
120
+ Test the _to_numpy function with NumPy arrays of numeric dtypes.
121
121
122
122
Test both 1-D and 2-D arrays which are not C-contiguous.
123
123
"""
@@ -137,9 +137,9 @@ def test_to_numpy_ndarray_numpy_dtypes_numeric(dtype, expected_dtype):
137
137
138
138
139
139
@pytest .mark .parametrize ("dtype" , [None , np .str_ , "U10" ])
140
- def test_to_numpy_ndarray_numpy_dtypes_string (dtype ):
140
+ def test_to_numpy_numpy_string (dtype ):
141
141
"""
142
- Test the _to_numpy function with NumPy arrays of string types .
142
+ Test the _to_numpy function with NumPy arrays of string dtypes .
143
143
"""
144
144
array = np .array (["abc" , "defg" , "12345" ], dtype = dtype )
145
145
result = _to_numpy (array )
@@ -177,9 +177,9 @@ def test_to_numpy_ndarray_numpy_dtypes_string(dtype):
177
177
# 3. https://pandas.pydata.org/docs/user_guide/pyarrow.html
178
178
########################################################################################
179
179
@pytest .mark .parametrize (("dtype" , "expected_dtype" ), np_dtype_params )
180
- def test_to_numpy_pandas_series_numpy_dtypes_numeric (dtype , expected_dtype ):
180
+ def test_to_numpy_pandas_numeric (dtype , expected_dtype ):
181
181
"""
182
- Test the _to_numpy function with pandas.Series of NumPy numeric dtypes.
182
+ Test the _to_numpy function with pandas.Series of numeric dtypes.
183
183
"""
184
184
series = pd .Series ([1 , 2 , 3 , 4 , 5 , 6 ], dtype = dtype )[::2 ] # Not C-contiguous
185
185
result = _to_numpy (series )
@@ -207,9 +207,9 @@ def test_to_numpy_pandas_series_numpy_dtypes_numeric(dtype, expected_dtype):
207
207
),
208
208
],
209
209
)
210
- def test_to_numpy_pandas_series_pandas_dtypes_string (dtype ):
210
+ def test_to_numpy_pandas_string (dtype ):
211
211
"""
212
- Test the _to_numpy function with pandas.Series of pandas string types .
212
+ Test the _to_numpy function with pandas.Series of string dtypes .
213
213
214
214
In pandas, string arrays can be specified in multiple ways.
215
215
@@ -229,7 +229,7 @@ def test_to_numpy_pandas_series_pandas_dtypes_string(dtype):
229
229
pytest .param ("date64[ms][pyarrow]" , "datetime64[ms]" , id = "date64[ms]" ),
230
230
],
231
231
)
232
- def test_to_numpy_pandas_series_pyarrow_dtypes_date (dtype , expected_dtype ):
232
+ def test_to_numpy_pandas_date (dtype , expected_dtype ):
233
233
"""
234
234
Test the _to_numpy function with pandas.Series of PyArrow date32/date64 types.
235
235
"""
@@ -282,9 +282,9 @@ def test_to_numpy_pandas_series_pyarrow_dtypes_date(dtype, expected_dtype):
282
282
pytest .param ("float64" , np .float64 , id = "float64" ),
283
283
],
284
284
)
285
- def test_to_numpy_pyarrow_array_pyarrow_dtypes_numeric (dtype , expected_dtype ):
285
+ def test_to_numpy_pyarrow_numeric (dtype , expected_dtype ):
286
286
"""
287
- Test the _to_numpy function with PyArrow arrays of PyArrow numeric types.
287
+ Test the _to_numpy function with PyArrow arrays of numeric types.
288
288
"""
289
289
data = [1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 ]
290
290
if dtype == "float16" : # float16 needs special handling
@@ -313,9 +313,9 @@ def test_to_numpy_pyarrow_array_pyarrow_dtypes_numeric(dtype, expected_dtype):
313
313
pytest .param ("float64" , np .float64 , id = "float64" ),
314
314
],
315
315
)
316
- def test_to_numpy_pyarrow_array_pyarrow_dtypes_numeric_with_na (dtype , expected_dtype ):
316
+ def test_to_numpy_pyarrow_numeric_with_na (dtype , expected_dtype ):
317
317
"""
318
- Test the _to_numpy function with PyArrow arrays of PyArrow numeric types and NA.
318
+ Test the _to_numpy function with PyArrow arrays of numeric types and NA.
319
319
"""
320
320
data = [1.0 , 2.0 , None , 4.0 , 5.0 , 6.0 ]
321
321
if dtype == "float16" : # float16 needs special handling
@@ -339,9 +339,9 @@ def test_to_numpy_pyarrow_array_pyarrow_dtypes_numeric_with_na(dtype, expected_d
339
339
"string_view" ,
340
340
],
341
341
)
342
- def test_to_numpy_pyarrow_array_pyarrow_dtypes_string (dtype ):
342
+ def test_to_numpy_pyarrow_string (dtype ):
343
343
"""
344
- Test the _to_numpy function with PyArrow arrays of PyArrow string types.
344
+ Test the _to_numpy function with PyArrow arrays of string types.
345
345
"""
346
346
array = pa .array (["abc" , "defg" , "12345" ], type = dtype )
347
347
result = _to_numpy (array )
@@ -357,9 +357,9 @@ def test_to_numpy_pyarrow_array_pyarrow_dtypes_string(dtype):
357
357
pytest .param ("date64[ms]" , "datetime64[ms]" , id = "date64[ms]" ),
358
358
],
359
359
)
360
- def test_to_numpy_pyarrow_array_pyarrow_dtypes_date (dtype , expected_dtype ):
360
+ def test_to_numpy_pyarrow_date (dtype , expected_dtype ):
361
361
"""
362
- Test the _to_numpy function with PyArrow arrays of PyArrow date types.
362
+ Test the _to_numpy function with PyArrow arrays of date32/date64 types.
363
363
364
364
date32[day] and date64[ms] are stored as 32-bit and 64-bit integers, respectively,
365
365
representing the number of days and milliseconds since the UNIX epoch (1970-01-01).
0 commit comments