@@ -118,9 +118,9 @@ def test_to_numpy_python_types(data, expected_dtype):
118
118
119
119
120
120
@pytest .mark .parametrize (("dtype" , "expected_dtype" ), np_dtype_params )
121
- def test_to_numpy_ndarray_numpy_dtypes_numeric (dtype , expected_dtype ):
121
+ def test_to_numpy_numpy_numeric (dtype , expected_dtype ):
122
122
"""
123
- Test the _to_numpy function with NumPy arrays of NumPy numeric dtypes.
123
+ Test the _to_numpy function with NumPy arrays of numeric dtypes.
124
124
125
125
Test both 1-D and 2-D arrays which are not C-contiguous.
126
126
"""
@@ -140,9 +140,9 @@ def test_to_numpy_ndarray_numpy_dtypes_numeric(dtype, expected_dtype):
140
140
141
141
142
142
@pytest .mark .parametrize ("dtype" , [None , np .str_ , "U10" ])
143
- def test_to_numpy_ndarray_numpy_dtypes_string (dtype ):
143
+ def test_to_numpy_numpy_string (dtype ):
144
144
"""
145
- Test the _to_numpy function with NumPy arrays of string types .
145
+ Test the _to_numpy function with NumPy arrays of string dtypes .
146
146
"""
147
147
array = np .array (["abc" , "defg" , "12345" ], dtype = dtype )
148
148
result = _to_numpy (array )
@@ -213,8 +213,7 @@ def test_to_numpy_ndarray_numpy_dtypes_string(dtype):
213
213
)
214
214
def test_to_numpy_pandas_numeric (dtype , expected_dtype ):
215
215
"""
216
- Test the _to_numpy function with pandas.Series of NumPy/pandas/PyArrow numeric
217
- dtypes.
216
+ Test the _to_numpy function with pandas.Series of numeric dtypes.
218
217
"""
219
218
data = [1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 ]
220
219
if dtype == "float16[pyarrow]" and Version (pd .__version__ ) < Version ("2.2" ):
@@ -294,9 +293,9 @@ def test_to_numpy_pandas_series_pandas_dtypes_numeric_with_na(dtype, expected_dt
294
293
),
295
294
],
296
295
)
297
- def test_to_numpy_pandas_series_pandas_dtypes_string (dtype ):
296
+ def test_to_numpy_pandas_string (dtype ):
298
297
"""
299
- Test the _to_numpy function with pandas.Series of pandas string types .
298
+ Test the _to_numpy function with pandas.Series of string dtypes .
300
299
301
300
In pandas, string arrays can be specified in multiple ways.
302
301
@@ -316,7 +315,7 @@ def test_to_numpy_pandas_series_pandas_dtypes_string(dtype):
316
315
pytest .param ("date64[ms][pyarrow]" , "datetime64[ms]" , id = "date64[ms]" ),
317
316
],
318
317
)
319
- def test_to_numpy_pandas_series_pyarrow_dtypes_date (dtype , expected_dtype ):
318
+ def test_to_numpy_pandas_date (dtype , expected_dtype ):
320
319
"""
321
320
Test the _to_numpy function with pandas.Series of PyArrow date32/date64 types.
322
321
"""
@@ -369,9 +368,9 @@ def test_to_numpy_pandas_series_pyarrow_dtypes_date(dtype, expected_dtype):
369
368
pytest .param ("float64" , np .float64 , id = "float64" ),
370
369
],
371
370
)
372
- def test_to_numpy_pyarrow_array_pyarrow_dtypes_numeric (dtype , expected_dtype ):
371
+ def test_to_numpy_pyarrow_numeric (dtype , expected_dtype ):
373
372
"""
374
- Test the _to_numpy function with PyArrow arrays of PyArrow numeric types.
373
+ Test the _to_numpy function with PyArrow arrays of numeric types.
375
374
"""
376
375
data = [1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 ]
377
376
if dtype == "float16" : # float16 needs special handling
@@ -400,9 +399,9 @@ def test_to_numpy_pyarrow_array_pyarrow_dtypes_numeric(dtype, expected_dtype):
400
399
pytest .param ("float64" , np .float64 , id = "float64" ),
401
400
],
402
401
)
403
- def test_to_numpy_pyarrow_array_pyarrow_dtypes_numeric_with_na (dtype , expected_dtype ):
402
+ def test_to_numpy_pyarrow_numeric_with_na (dtype , expected_dtype ):
404
403
"""
405
- Test the _to_numpy function with PyArrow arrays of PyArrow numeric types and NA.
404
+ Test the _to_numpy function with PyArrow arrays of numeric types and NA.
406
405
"""
407
406
data = [1.0 , 2.0 , None , 4.0 , 5.0 , 6.0 ]
408
407
if dtype == "float16" : # float16 needs special handling
@@ -426,9 +425,9 @@ def test_to_numpy_pyarrow_array_pyarrow_dtypes_numeric_with_na(dtype, expected_d
426
425
"string_view" ,
427
426
],
428
427
)
429
- def test_to_numpy_pyarrow_array_pyarrow_dtypes_string (dtype ):
428
+ def test_to_numpy_pyarrow_string (dtype ):
430
429
"""
431
- Test the _to_numpy function with PyArrow arrays of PyArrow string types.
430
+ Test the _to_numpy function with PyArrow arrays of string types.
432
431
"""
433
432
array = pa .array (["abc" , "defg" , "12345" ], type = dtype )
434
433
result = _to_numpy (array )
@@ -444,9 +443,9 @@ def test_to_numpy_pyarrow_array_pyarrow_dtypes_string(dtype):
444
443
pytest .param ("date64[ms]" , "datetime64[ms]" , id = "date64[ms]" ),
445
444
],
446
445
)
447
- def test_to_numpy_pyarrow_array_pyarrow_dtypes_date (dtype , expected_dtype ):
446
+ def test_to_numpy_pyarrow_date (dtype , expected_dtype ):
448
447
"""
449
- Test the _to_numpy function with PyArrow arrays of PyArrow date types.
448
+ Test the _to_numpy function with PyArrow arrays of date32/date64 types.
450
449
451
450
date32[day] and date64[ms] are stored as 32-bit and 64-bit integers, respectively,
452
451
representing the number of days and milliseconds since the UNIX epoch (1970-01-01).
0 commit comments