Skip to content

Commit 5148fb0

Browse files
Technologicatclaude
andcommitted
Docs: imathify'd → imathified for consistency
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a7c6528 commit 5148fb0

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
- `Sliced` has abstract `__getitem__`.
2121
- `FupTarget` has abstract `__getitem__` returning `Fuppable`.
2222
- `Fuppable` has abstract `__lshift__`.
23-
- `slift1`, `slift2`: lift scalar unary/binary operations to work termwise on iterables, returning `imathify`'d lazy generators. Accept optional extra arguments baked into each call (e.g. `slift1(round, 2)`). These are the mechanism behind all built-in `s`-prefixed operators, now exposed for user-defined functions.
23+
- `slift1`, `slift2`: lift scalar unary/binary operations to work termwise on iterables, returning imathified lazy generators. Accept optional extra arguments baked into each call (e.g. `slift1(round, 2)`). These are the mechanism behind all built-in `s`-prefixed operators, now exposed for user-defined functions.
2424
- `ConditionProtocol`: `typing.Protocol` capturing the call signature shared by error-handling protocols (`signal`, `error`, `cerror`, `warn`). Useful for annotating custom protocols.
2525

2626
**Changed**:

doc/features.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2556,7 +2556,7 @@ We provide the [Cauchy product](https://en.wikipedia.org/wiki/Cauchy_product), a
25562556
25572557
We also provide `gmathify`, a decorator to mathify a gfunc, so that it will `imathify()` the generator instances it makes. Combo with `imemoize` for great justice, e.g. `a = gmathify(imemoize(myiterable))`, and then `a()` to instantiate a memoized-and-mathified copy.
25582558
2559-
To apply a custom function termwise to an iterable, use `slift1` (unary) or `slift2` (binary). These lift a scalar operation into one that works on iterables, returning a lazy `imathify`'d generator. All the built-in `s`-prefixed operators (`sadd`, `sabs`, ...) are defined using this mechanism. Extra arguments are baked into each call: e.g. `slift1(round, 2)` gives termwise `round(x, 2)`.
2559+
To apply a custom function termwise to an iterable, use `slift1` (unary) or `slift2` (binary). These lift a scalar operation into one that works on iterables, returning a lazy imathified generator. All the built-in `s`-prefixed operators (`sadd`, `sabs`, ...) are defined using this mechanism. Extra arguments are baked into each call: e.g. `slift1(round, 2)` gives termwise `round(x, 2)`.
25602560
25612561
```python
25622562
from unpythonic import slift1, slift2, s, take

unpythonic/tests/test_mathseq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def runtests():
172172
test_raises[ValueError, cauchyprod(s(1, 3, 5, ...), s(2, 4, 6, ...), require="invalid_value")]
173173

174174
with testset("imathify, gmathify (infix syntax for arithmetic)"):
175-
# Sequences returned by `s` are `imathify`'d implicitly.
175+
# Sequences returned by `s` are imathified implicitly.
176176
test[tuple(take(5, s(1, 3, 5, ...) + s(2, 4, 6, ...))) == (3, 7, 11, 15, 19)]
177177
test[tuple(take(5, 1 + s(1, 3, ...))) == (2, 4, 6, 8, 10)]
178178
test[tuple(take(5, 1 - s(1, 3, ...))) == (0, -2, -4, -6, -8)]

0 commit comments

Comments
 (0)