Commit 06acccb
committed
MAINT: remove a dead code branch from test_nonzero
The branch is checking for x.ndim == 0, while the hypothesis
decorator only generates arrays of at least ndim=1:
`given(hh.arrays(dtype=hh.all_dtypes, shape=hh.shapes(min_dims=1, min_side=1)))`
This is consistent with the spec:
https://data-apis.org/array-api/draft/API_specification/generated/array_api.nonzero.html
> x (array) – input array. **Must** have one or more dimensions.
> If x is zero-dimensional, the function **must** raise an exception.1 parent 233f140 commit 06acccb
1 file changed
Lines changed: 9 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
196 | 192 | | |
197 | 193 | | |
198 | 194 | | |
| |||
0 commit comments