File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments