@@ -115,7 +115,7 @@ def validate_data_input(
115
115
raise GMTInvalidInput ("data must provide x, y, and z columns." )
116
116
117
117
118
- def data_kind (data = None , x = None , y = None , z = None , required_z = False , required_data = True ):
118
+ def data_kind (data = None , required_data = True ):
119
119
"""
120
120
Check what kind of data is provided to a module.
121
121
@@ -137,12 +137,6 @@ def data_kind(data=None, x=None, y=None, z=None, required_z=False, required_data
137
137
Pass in either a file name or :class:`pathlib.Path` to an ASCII data
138
138
table, an :class:`xarray.DataArray`, a 1-D/2-D
139
139
{table-classes} or an option argument.
140
- x/y : 1-D arrays or None
141
- x and y columns as numpy arrays.
142
- z : 1-D array or None
143
- z column as numpy array. To be used optionally when x and y are given.
144
- required_z : bool
145
- State whether the 'z' column is required.
146
140
required_data : bool
147
141
Set to True when 'data' is required, or False when dealing with
148
142
optional virtual files. [Default is True].
@@ -159,19 +153,19 @@ def data_kind(data=None, x=None, y=None, z=None, required_z=False, required_data
159
153
>>> import numpy as np
160
154
>>> import xarray as xr
161
155
>>> import pathlib
162
- >>> data_kind(data=None, x=np.array([1, 2, 3]), y=np.array([4, 5, 6]) )
156
+ >>> data_kind(data=None)
163
157
'vectors'
164
- >>> data_kind(data=np.arange(10).reshape((5, 2)), x=None, y=None )
158
+ >>> data_kind(data=np.arange(10).reshape((5, 2)))
165
159
'matrix'
166
- >>> data_kind(data="my-data-file.txt", x=None, y=None )
160
+ >>> data_kind(data="my-data-file.txt")
167
161
'file'
168
- >>> data_kind(data=pathlib.Path("my-data-file.txt"), x=None, y=None )
162
+ >>> data_kind(data=pathlib.Path("my-data-file.txt"))
169
163
'file'
170
- >>> data_kind(data=None, x=None, y=None, required_data=False)
164
+ >>> data_kind(data=None, required_data=False)
171
165
'arg'
172
- >>> data_kind(data=2.0, x=None, y=None, required_data=False)
166
+ >>> data_kind(data=2.0, required_data=False)
173
167
'arg'
174
- >>> data_kind(data=True, x=None, y=None, required_data=False)
168
+ >>> data_kind(data=True, required_data=False)
175
169
'arg'
176
170
>>> data_kind(data=xr.DataArray(np.random.rand(4, 3)))
177
171
'grid'
0 commit comments