diff --git a/pygmt/clib/session.py b/pygmt/clib/session.py index 4004e563cd5..a3b19d28bd2 100644 --- a/pygmt/clib/session.py +++ b/pygmt/clib/session.py @@ -1605,7 +1605,6 @@ def virtualfile_in( # noqa: PLR0912 x=None, y=None, z=None, - extra_arrays=None, required_z=False, required_data=True, ): @@ -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 @@ -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. @@ -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, )