Skip to content

Commit f3d22d4

Browse files
authored
Merge branch 'main' into to_numpy/pandas_numeric
2 parents 20c447b + 7db84f7 commit f3d22d4

File tree

3 files changed

+18
-19
lines changed

3 files changed

+18
-19
lines changed

examples/gallery/images/cross_section.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
# Add a colorbar for the elevation
3939
fig.colorbar(
40-
# Place the colorbar inside the plot (lower-case "j") in the Botton Right (BR)
40+
# Place the colorbar inside the plot (lower-case "j") in the Bottom Right (BR)
4141
# corner with an offset ("+o") of 0.7 centimeters and 0.3 centimeters in x or y
4242
# directions, respectively; move the x label above the horizontal colorbar ("+ml")
4343
position="jBR+o0.7c/0.8c+h+w5c/0.3c+ml",

examples/tutorials/advanced/cartesian_histograms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
# ----------------------------
134134
#
135135
# By default, a histogram showing the counts in each bin is created (``histtype=0``).
136-
# To show the frequency percent set the ``histtpye`` parameter to ``1``. For further
136+
# To show the frequency percent set the ``histtype`` parameter to ``1``. For further
137137
# options please have a look at the documentation of :meth:`pygmt.Figure.histogram`.
138138

139139
fig = pygmt.Figure()

pygmt/tests/test_clib_to_numpy.py

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ def test_to_numpy_python_types(data, expected_dtype):
118118

119119

120120
@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):
122122
"""
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.
124124
125125
Test both 1-D and 2-D arrays which are not C-contiguous.
126126
"""
@@ -140,9 +140,9 @@ def test_to_numpy_ndarray_numpy_dtypes_numeric(dtype, expected_dtype):
140140

141141

142142
@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):
144144
"""
145-
Test the _to_numpy function with NumPy arrays of string types.
145+
Test the _to_numpy function with NumPy arrays of string dtypes.
146146
"""
147147
array = np.array(["abc", "defg", "12345"], dtype=dtype)
148148
result = _to_numpy(array)
@@ -213,8 +213,7 @@ def test_to_numpy_ndarray_numpy_dtypes_string(dtype):
213213
)
214214
def test_to_numpy_pandas_numeric(dtype, expected_dtype):
215215
"""
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.
218217
"""
219218
data = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
220219
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
294293
),
295294
],
296295
)
297-
def test_to_numpy_pandas_series_pandas_dtypes_string(dtype):
296+
def test_to_numpy_pandas_string(dtype):
298297
"""
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.
300299
301300
In pandas, string arrays can be specified in multiple ways.
302301
@@ -316,7 +315,7 @@ def test_to_numpy_pandas_series_pandas_dtypes_string(dtype):
316315
pytest.param("date64[ms][pyarrow]", "datetime64[ms]", id="date64[ms]"),
317316
],
318317
)
319-
def test_to_numpy_pandas_series_pyarrow_dtypes_date(dtype, expected_dtype):
318+
def test_to_numpy_pandas_date(dtype, expected_dtype):
320319
"""
321320
Test the _to_numpy function with pandas.Series of PyArrow date32/date64 types.
322321
"""
@@ -369,9 +368,9 @@ def test_to_numpy_pandas_series_pyarrow_dtypes_date(dtype, expected_dtype):
369368
pytest.param("float64", np.float64, id="float64"),
370369
],
371370
)
372-
def test_to_numpy_pyarrow_array_pyarrow_dtypes_numeric(dtype, expected_dtype):
371+
def test_to_numpy_pyarrow_numeric(dtype, expected_dtype):
373372
"""
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.
375374
"""
376375
data = [1.0, 2.0, 3.0, 4.0, 5.0, 6.0]
377376
if dtype == "float16": # float16 needs special handling
@@ -400,9 +399,9 @@ def test_to_numpy_pyarrow_array_pyarrow_dtypes_numeric(dtype, expected_dtype):
400399
pytest.param("float64", np.float64, id="float64"),
401400
],
402401
)
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):
404403
"""
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.
406405
"""
407406
data = [1.0, 2.0, None, 4.0, 5.0, 6.0]
408407
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
426425
"string_view",
427426
],
428427
)
429-
def test_to_numpy_pyarrow_array_pyarrow_dtypes_string(dtype):
428+
def test_to_numpy_pyarrow_string(dtype):
430429
"""
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.
432431
"""
433432
array = pa.array(["abc", "defg", "12345"], type=dtype)
434433
result = _to_numpy(array)
@@ -444,9 +443,9 @@ def test_to_numpy_pyarrow_array_pyarrow_dtypes_string(dtype):
444443
pytest.param("date64[ms]", "datetime64[ms]", id="date64[ms]"),
445444
],
446445
)
447-
def test_to_numpy_pyarrow_array_pyarrow_dtypes_date(dtype, expected_dtype):
446+
def test_to_numpy_pyarrow_date(dtype, expected_dtype):
448447
"""
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.
450449
451450
date32[day] and date64[ms] are stored as 32-bit and 64-bit integers, respectively,
452451
representing the number of days and milliseconds since the UNIX epoch (1970-01-01).

0 commit comments

Comments
 (0)