Skip to content

Commit

Permalink
Add a test for offsetting beachballs with ndarray inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Jun 24, 2023
1 parent 6de0907 commit 7ae8816
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pygmt/tests/test_meca.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def test_meca_spec_multiple_focalmecha(inputtype):


@pytest.mark.mpl_image_compare(filename="test_meca_offset.png")
@pytest.mark.parametrize("inputtype", ["offset_args", "offset_dict"])
@pytest.mark.parametrize("inputtype", ["offset_args", "offset_dict", "ndarray"])
def test_meca_offset(inputtype):
"""
Test offsetting beachballs.
Expand Down Expand Up @@ -173,6 +173,13 @@ def test_meca_offset(inputtype):
"latitude": 48,
"depth": 12.0,
}
elif inputtype == "ndarray":
# Test ndarray input reported in
# https://github.com/GenericMappingTools/pygmt/issues/2016
args = {
"spec": np.array([[-124, 48, 12.0, 330, 30, 90, 3, -124.5, 47.5]]),
"convention": "aki",
}

fig = Figure()
fig.basemap(region=[-125, -122, 47, 49], projection="M6c", frame=True)
Expand Down

0 comments on commit 7ae8816

Please sign in to comment.