@@ -228,7 +228,7 @@ class BoundFromDtype(FromDtypeFunc):
228
228
229
229
>>> strategy = xps.from_dtype(xp.float64).filter(lambda i: i != 0)
230
230
231
- i.e. a strategy that generates any floats except 0
231
+ i.e. a strategy that generates any float except +0 and - 0
232
232
233
233
3. The underlying function that returns an elements strategy from a dtype, e.g.
234
234
@@ -245,7 +245,7 @@ class BoundFromDtype(FromDtypeFunc):
245
245
... math.ceil(xp.finfo(d).min), math.floor(xp.finfo(d).max)
246
246
... )
247
247
248
- i.e. a strategy that generates integers (within the dtypes range)
248
+ i.e. a strategy that generates integers (within the dtype's range)
249
249
250
250
This is useful to avoid translating special case conditions into either a
251
251
dict, filter or "base func", and instead allows us to generalise these three
@@ -332,12 +332,12 @@ def parse_cond(cond_str: str) -> Tuple[UnaryCheck, str, FromDtypeFunc]:
332
332
e.g.
333
333
334
334
>>> cond, expr_template, from_dtype = parse_cond('greater than ``0``')
335
- >>> expr_template.replace('{}', 'x_i')
336
- 'x_i > 0'
337
335
>>> cond(42)
338
336
True
339
337
>>> cond(-128)
340
338
False
339
+ >>> expr_template.replace('{}', 'x_i')
340
+ 'x_i > 0'
341
341
>>> strategy = from_dtype(xp.float64)
342
342
>>> for _ in range(5):
343
343
... print(strategy.example())
@@ -478,12 +478,12 @@ def parse_result(result_str: str) -> Tuple[UnaryCheck, str]:
478
478
e.g.
479
479
480
480
>>> check_result, expr = parse_result('``42``')
481
- >>> expr_template.replace('{}', 'x_i')
482
- '42'
483
481
>>> check_result(7)
484
482
False
485
483
>>> check_result(42)
486
484
True
485
+ >>> expr
486
+ '42'
487
487
488
488
"""
489
489
if m := r_code .match (result_str ):
0 commit comments