@@ -1774,6 +1774,7 @@ def virtualfile_in(
1774
1774
z = None ,
1775
1775
required_z = False ,
1776
1776
required_data = True ,
1777
+ extra_arrays = None ,
1777
1778
):
1778
1779
"""
1779
1780
Store any data inside a virtual file.
@@ -1798,6 +1799,13 @@ def virtualfile_in(
1798
1799
required_data : bool
1799
1800
Set to True when 'data' is required, or False when dealing with
1800
1801
optional virtual files. [Default is True].
1802
+ extra_arrays : list of 1-D arrays
1803
+ Optional. A list of numpy arrays in addition to x, y, and z. All of these
1804
+ arrays must be of the same size as the x/y/z arrays.
1805
+
1806
+ .. deprecated:: v0.16.0
1807
+ The parameter 'extra_arrays' will be removed in v0.20.0. Prepare and pass
1808
+ a dictionary of arrays instead. E.g., `{"x": x, "y": y, "size": size}`.
1801
1809
1802
1810
Returns
1803
1811
-------
@@ -1875,6 +1883,14 @@ def virtualfile_in(
1875
1883
_data = [x , y ]
1876
1884
if z is not None :
1877
1885
_data .append (z )
1886
+ if extra_arrays :
1887
+ msg = (
1888
+ "The parameter 'extra_arrays' will be removed in v0.20.0. "
1889
+ "Prepare and pass a dictionary of arrays instead. E.g., "
1890
+ "`{'x': x, 'y': y, 'size': size}`."
1891
+ )
1892
+ warnings .warn (message = msg , category = FutureWarning , stacklevel = 1 )
1893
+ _data .extend (extra_arrays )
1878
1894
case "vectors" :
1879
1895
if hasattr (data , "items" ) and not hasattr (data , "to_frame" ):
1880
1896
# Dictionary, pandas.DataFrame or xarray.Dataset types.
0 commit comments