Skip to content

Commit b320d0b

Browse files
authored
Merge branch 'main' into to_numpy/pandas_numeric
2 parents 949274d + ead78bf commit b320d0b

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

examples/tutorials/advanced/date_time_charts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@
196196
# uses :func:`pandas.date_range` to fill the DataArray with data, but this is not
197197
# essential for the creation of a valid DataArray.
198198

199-
x = xr.DataArray(data=pd.date_range(start="2020-01-01", periods=4, freq="Q"))
199+
x = xr.DataArray(data=pd.date_range(start="2020-01-01", periods=4, freq="QE"))
200200
y = [4, 7, 5, 6]
201201

202202
fig = pygmt.Figure()
@@ -331,7 +331,7 @@
331331
# found at :gmt-term:`FORMAT_CLOCK_MAP`, :gmt-term:`FORMAT_CLOCK_IN`, and
332332
# :gmt-term:`FORMAT_CLOCK_OUT`.
333333

334-
x = pd.date_range("2021-04-15", periods=8, freq="6H")
334+
x = pd.date_range("2021-04-15", periods=8, freq="6h")
335335
y = [2, 5, 3, 1, 5, 7, 9, 6]
336336

337337
fig = pygmt.Figure()

pygmt/tests/test_clib_to_numpy.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class pa: # noqa: N801
2424
A dummy class to mimic pyarrow.
2525
"""
2626

27+
__version__ = "0.0.0"
28+
2729
@staticmethod
2830
def timestamp(unit: str, tz: str | None = None):
2931
"""
@@ -422,7 +424,13 @@ def test_to_numpy_pyarrow_numeric_with_na(dtype, expected_dtype):
422424
"utf8", # alias for string
423425
"large_string",
424426
"large_utf8", # alias for large_string
425-
"string_view",
427+
pytest.param(
428+
"string_view",
429+
marks=pytest.mark.skipif(
430+
Version(pa.__version__) < Version("16"),
431+
reason="string_view type was added since pyarrow 16",
432+
),
433+
),
426434
],
427435
)
428436
def test_to_numpy_pyarrow_string(dtype):

0 commit comments

Comments
 (0)