Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions pygmt/clib/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from pygmt.exceptions import (
GMTCLibError,
GMTCLibNoSessionError,
GMTInvalidInput,
GMTTypeError,
GMTValueError,
)
Expand Down Expand Up @@ -1465,8 +1464,7 @@ def virtualfile_from_vectors(self, vectors: Sequence) -> Generator[str, None, No

rows = len(arrays[0])
if not all(len(i) == rows for i in arrays):
msg = "All arrays must have same size."
raise GMTInvalidInput(msg)
raise GMTValueError(arrays, reason="All arrays must have same size.")

family = "GMT_IS_DATASET|GMT_VIA_VECTOR"
geometry = "GMT_IS_POINT"
Expand Down
4 changes: 2 additions & 2 deletions pygmt/tests/test_clib_virtualfile_from_vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import pytest
from pygmt import clib
from pygmt.clib.session import DTYPES_NUMERIC
from pygmt.exceptions import GMTInvalidInput
from pygmt.exceptions import GMTValueError
from pygmt.helpers import GMTTempFile
from pygmt.helpers.testing import skip_if_no

Expand Down Expand Up @@ -141,7 +141,7 @@ def test_virtualfile_from_vectors_diff_size():
x = np.arange(5)
y = np.arange(6)
with clib.Session() as lib:
with pytest.raises(GMTInvalidInput):
with pytest.raises(GMTValueError):
with lib.virtualfile_from_vectors((x, y)):
pass

Expand Down
Loading