Skip to content

Commit 0615b5b

Browse files
committed
Test pandas.Series with numpy dtypes
1 parent f182efd commit 0615b5b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pygmt/tests/test_clib_to_numpy.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,10 @@ def test_to_numpy_pandas_numeric(dtype, expected_dtype):
205205
@pytest.mark.parametrize(
206206
("dtype", "expected_dtype"),
207207
[
208+
pytest.param(np.float16, np.float16, id="float16"),
209+
pytest.param(np.float32, np.float32, id="float32"),
210+
pytest.param(np.float64, np.float64, id="float64"),
211+
pytest.param(np.longdouble, np.longdouble, id="longdouble"),
208212
pytest.param(pd.Int8Dtype(), np.float64, id="Int8"),
209213
pytest.param(pd.Int16Dtype(), np.float64, id="Int16"),
210214
pytest.param(pd.Int32Dtype(), np.float64, id="Int32"),
@@ -230,8 +234,8 @@ def test_to_numpy_pandas_numeric(dtype, expected_dtype):
230234
)
231235
def test_to_numpy_pandas_numeric_with_na(dtype, expected_dtype):
232236
"""
233-
Test the _to_numpy function with pandas.Series of pandas/PyArrow numeric dtypes and
234-
missing values (NA).
237+
Test the _to_numpy function with pandas.Series of NumPy/pandas/PyArrow numeric
238+
dtypes and missing values (NA).
235239
"""
236240
data = [1.0, 2.0, None, 4.0, 5.0, 6.0]
237241
if dtype == "float16[pyarrow]" and Version(pd.__version__) < Version("2.2"):

0 commit comments

Comments
 (0)