Skip to content

Commit e12be88

Browse files
committed
work on docstrings
1 parent ec48f2e commit e12be88

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

uxarray/subset/dataarray_accessor.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,20 +132,20 @@ def constant_latitude(
132132
inverse_indices: Union[List[str], Set[str], bool] = False,
133133
lon_range: Tuple[float, float] = (-180, 180),
134134
):
135-
"""Extracts a cross-section of the data array across a line of constant-latitude.
135+
"""Extracts a subset of the data array across a line of constant-latitude.
136136
137137
Parameters
138138
----------
139139
lat : float
140-
The latitude at which to extract the cross-section, in degrees.
140+
The latitude at which to extract the subset, in degrees.
141141
Must be between -90.0 and 90.0
142142
inverse_indices : Union[List[str], Set[str], bool], optional
143143
Controls storage of original grid indices. Options:
144144
- True: Stores original face indices
145145
- List/Set of strings: Stores specified index types (valid values: "face", "edge", "node")
146146
- False: No index storage (default)
147147
lon_range: Tuple[float, float], optional
148-
`(min_lon, max_lon)` longitude values to perform the cross-section. Values must lie in [-180, 180]. Default is `(-180, 180)`.
148+
`(min_lon, max_lon)` longitude values to perform the subset. Values must lie in [-180, 180]. Default is `(-180, 180)`.
149149
150150
Returns
151151
-------
@@ -192,7 +192,7 @@ def constant_longitude(
192192
inverse_indices: Union[List[str], Set[str], bool] = False,
193193
lat_range: Tuple[float, float] = (-90, 90),
194194
):
195-
"""Extracts a cross-section of the data array across a line of constant-longitude.
195+
"""Extracts a subset of the data array across a line of constant-longitude.
196196
197197
This method supports two modes:
198198
- **grid‐based** (`interpolate=False`, the default): returns exactly those faces
@@ -203,15 +203,15 @@ def constant_longitude(
203203
Parameters
204204
----------
205205
lon : float
206-
The longitude at which to extract the cross-section, in degrees.
206+
The longitude at which to extract the subset, in degrees.
207207
Must be between -180.0 and 180.0
208208
inverse_indices : Union[List[str], Set[str], bool], optional
209209
Controls storage of original grid indices. Options:
210210
- True: Stores original face indices
211211
- List/Set of strings: Stores specified index types (valid values: "face", "edge", "node")
212212
- False: No index storage (default)
213213
lat_range: Tuple[float, float], optional
214-
`(min_lat, max_lat)` latitude values to perform the cross-section. Values must lie in [-90, 90]. Default is `(-90, 90)`.
214+
`(min_lat, max_lat)` latitude values to perform the subset. Values must lie in [-90, 90]. Default is `(-90, 90)`.
215215
216216
Returns
217217
-------
@@ -258,13 +258,13 @@ def constant_latitude_interval(
258258
lats: Tuple[float, float],
259259
inverse_indices: Union[List[str], Set[str], bool] = False,
260260
):
261-
"""Extracts a cross-section of data by selecting all faces that
261+
"""Extracts a subset of data by selecting all faces that
262262
are within a specified latitude interval.
263263
264264
Parameters
265265
----------
266266
lats : Tuple[float, float]
267-
The latitude interval (min_lat, max_lat) at which to extract the cross-section,
267+
The latitude interval (min_lat, max_lat) at which to extract the subset,
268268
in degrees. Values must be between -90.0 and 90.0
269269
inverse_indices : Union[List[str], Set[str], bool], optional
270270
Controls storage of original grid indices. Options:
@@ -298,12 +298,12 @@ def constant_longitude_interval(
298298
lons: Tuple[float, float],
299299
inverse_indices: Union[List[str], Set[str], bool] = False,
300300
):
301-
"""Extracts a cross-section of data by selecting all faces are within a specifed longitude interval.
301+
"""Extracts a subset of data by selecting all faces are within a specifed longitude interval.
302302
303303
Parameters
304304
----------
305305
lons : Tuple[float, float]
306-
The longitude interval (min_lon, max_lon) at which to extract the cross-section,
306+
The longitude interval (min_lon, max_lon) at which to extract the subset,
307307
in degrees. Values must be between -180.0 and 180.0
308308
inverse_indices : Union[List[str], Set[str], bool], optional
309309
Controls storage of original grid indices. Options:

uxarray/subset/grid_accessor.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ def constant_latitude(
144144
return_face_indices: bool = False,
145145
inverse_indices: Union[List[str], Set[str], bool] = False,
146146
):
147-
"""Extracts a cross-section of the grid by selecting all faces that
147+
"""Extracts a subset of the grid by selecting all faces that
148148
intersect with a specified line of constant latitude.
149149
150150
Parameters
151151
----------
152152
lon : float
153-
The longitude at which to extract the cross-section, in degrees.
153+
The longitude at which to extract the subset, in degrees.
154154
Must be between -90.0 and 90.0
155155
return_face_indices : bool, optional
156156
If True, also returns the indices of the faces that intersect with the
@@ -211,13 +211,13 @@ def constant_longitude(
211211
return_face_indices: bool = False,
212212
inverse_indices: Union[List[str], Set[str], bool] = False,
213213
):
214-
"""Extracts a cross-section of the grid by selecting all faces that
214+
"""Extracts a subset of the grid by selecting all faces that
215215
intersect with a specified line of constant longitude.
216216
217217
Parameters
218218
----------
219219
lon : float
220-
The longitude at which to extract the cross-section, in degrees.
220+
The longitude at which to extract the subset, in degrees.
221221
Must be between -180.0 and 180.0
222222
return_face_indices : bool, optional
223223
If True, also returns the indices of the faces that intersect with the
@@ -277,13 +277,13 @@ def constant_latitude_interval(
277277
return_face_indices: bool = False,
278278
inverse_indices: Union[List[str], Set[str], bool] = False,
279279
):
280-
"""Extracts a cross-section of the grid by selecting all faces that
280+
"""Extracts a subset of the grid by selecting all faces that
281281
are within a specified latitude interval.
282282
283283
Parameters
284284
----------
285285
lats : Tuple[float, float]
286-
The latitude interval (min_lat, max_lat) at which to extract the cross-section,
286+
The latitude interval (min_lat, max_lat) at which to extract the subset,
287287
in degrees. Values must be between -90.0 and 90.0
288288
return_face_indices : bool, optional
289289
If True, also returns the indices of the faces that intersect with the
@@ -339,12 +339,12 @@ def constant_longitude_interval(
339339
return_face_indices: bool = False,
340340
inverse_indices: Union[List[str], Set[str], bool] = False,
341341
):
342-
"""Extracts a cross-section of the grid by selecting all faces are within a specifed longitude interval.
342+
"""Extracts a subset of the grid by selecting all faces are within a specifed longitude interval.
343343
344344
Parameters
345345
----------
346346
lons : Tuple[float, float]
347-
The longitude interval (min_lon, max_lon) at which to extract the cross-section,
347+
The longitude interval (min_lon, max_lon) at which to extract the subset,
348348
in degrees. Values must be between -180.0 and 180.0
349349
return_face_indices : bool, optional
350350
If True, also returns the indices of the faces that intersect are within a specifed longitude interval.

0 commit comments

Comments
 (0)