Skip to content

Commit

Permalink
Session.virtualfile_in: Remove the extra_arrays parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Aug 4, 2024
1 parent 578b37b commit b7d2635
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pygmt/clib/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1605,7 +1605,6 @@ def virtualfile_in( # noqa: PLR0912
x=None,
y=None,
z=None,
extra_arrays=None,
required_z=False,
required_data=True,
):
Expand All @@ -1627,9 +1626,6 @@ def virtualfile_in( # noqa: PLR0912
data input.
x/y/z : 1-D arrays or None
x, y, and z columns as numpy arrays.
extra_arrays : list of 1-D arrays
Optional. A list of numpy arrays in addition to x, y, and z.
All of these arrays must be of the same size as the x/y/z arrays.
required_z : bool
State whether the 'z' column is required.
required_data : bool
Expand Down Expand Up @@ -1723,8 +1719,6 @@ def virtualfile_in( # noqa: PLR0912
_data = [np.atleast_1d(x), np.atleast_1d(y)]
if z is not None:
_data.append(np.atleast_1d(z))
if extra_arrays:
_data.extend(extra_arrays)
case "vectors":
if hasattr(data, "items") and not hasattr(data, "to_frame"):
# Dict, pandas.DataFrame or xarray.Dataset types.
Expand Down Expand Up @@ -1757,18 +1751,24 @@ def virtualfile_from_data(
instead.
"""
msg = (
"API function 'Session.virtualfile_from_datae()' has been deprecated since "
"API function 'Session.virtualfile_from_data()' has been deprecated since "
"v0.13.0 and will be removed in v0.15.0. Use 'Session.virtualfile_in()' "
"instead."
)
warnings.warn(msg, category=FutureWarning, stacklevel=2)
# Session.virtualfile_in no longer has the 'extra_arrays' parameter.
if data is None and extra_arrays is not None:
data = [np.atleast_1d(x), np.atleast_1d(y)]
if z is not None:
data.append(np.atleast_1d(z))
data.extend(extra_arrays)
x, y, z = None, None, None
return self.virtualfile_in(
check_kind=check_kind,
data=data,
x=x,
y=y,
z=z,
extra_arrays=extra_arrays,
required_z=required_z,
required_data=required_data,
)
Expand Down

0 comments on commit b7d2635

Please sign in to comment.