Skip to content

Commit 0a262dd

Browse files
committed
docstrings
1 parent db69824 commit 0a262dd

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

xarray_array_testing/strategies.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,32 @@ def orthogonal_indexers(
126126
max_dims: int | None = None,
127127
max_size: int = 10,
128128
) -> dict[Hashable, int | slice | np.ndarray]:
129+
"""Generate orthogonal indexers (vectorized/orthogonal indexing).
130+
131+
Parameters
132+
----------
133+
draw : callable
134+
The Hypothesis draw function (automatically provided by @st.composite).
135+
sizes : dict[Hashable, int]
136+
Dictionary mapping dimension names to their sizes.
137+
min_dims : int, optional
138+
Minimum number of dimensions to index
139+
max_dims : int or None, optional
140+
Maximum number of dimensions to index
141+
max_size : int, optional
142+
Maximum size of array indexers
143+
144+
Returns
145+
-------
146+
sizes : mapping of hashable to indexer
147+
Indexers as a dict with keys randomly selected from ``sizes.keys()``.
148+
Values are integers, slices, or 1D numpy arrays of integer indices for
149+
each dimension.
150+
151+
See Also
152+
--------
153+
hypothesis.extra.numpy.arrays
154+
"""
129155
selected_dims = draw(unique_subset_of(sizes, min_size=min_dims, max_size=max_dims))
130156

131157
return {

0 commit comments

Comments
 (0)