Skip to content

Commit

Permalink
Merge branch 'main' into to_numpy/pandas_numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelgrund authored Dec 2, 2024
2 parents 949274d + ead78bf commit b320d0b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/tutorials/advanced/date_time_charts.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
# uses :func:`pandas.date_range` to fill the DataArray with data, but this is not
# essential for the creation of a valid DataArray.

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

fig = pygmt.Figure()
Expand Down Expand Up @@ -331,7 +331,7 @@
# found at :gmt-term:`FORMAT_CLOCK_MAP`, :gmt-term:`FORMAT_CLOCK_IN`, and
# :gmt-term:`FORMAT_CLOCK_OUT`.

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

fig = pygmt.Figure()
Expand Down
10 changes: 9 additions & 1 deletion pygmt/tests/test_clib_to_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class pa: # noqa: N801
A dummy class to mimic pyarrow.
"""

__version__ = "0.0.0"

@staticmethod
def timestamp(unit: str, tz: str | None = None):
"""
Expand Down Expand Up @@ -422,7 +424,13 @@ def test_to_numpy_pyarrow_numeric_with_na(dtype, expected_dtype):
"utf8", # alias for string
"large_string",
"large_utf8", # alias for large_string
"string_view",
pytest.param(
"string_view",
marks=pytest.mark.skipif(
Version(pa.__version__) < Version("16"),
reason="string_view type was added since pyarrow 16",
),
),
],
)
def test_to_numpy_pyarrow_string(dtype):
Expand Down

0 comments on commit b320d0b

Please sign in to comment.