Commit 3a20ea8
committed
Backend-scoped Like fast path, tighten Dimension constructor, ShapedLike docs
- Scope Like fast-path trust per backend: JAX trusts (ndarray, jax.Array),
Torch trusts (ndarray, Tensor). Foreign-backend arrays now fall through
to the slow path where actual convertibility is verified via asarray.
- Add trusted_types parameter to _ArrayLikeChecker, _ArrayLikeFactory,
and make_array_like_type (default None preserves backward compat).
- Reject non-str/non-int in Dimension.__new__ (float, None, object).
- Reject +Scalar, +__, +~N in Dimension.__pos__.
- Guard bare "+" and "+__" in _dim_spec broadcastable parsing.
- Rename _ValueExpr to Value, remove TYPE_CHECKING branches for dims.
- Tighten broadcastable docs in README and notebook.
- Add ShapedLike runtime-vs-static approximation note to README.1 parent 532627c commit 3a20ea8
File tree
10 files changed
+726
-98
lines changed- examples
- src/shapix
- tests
10 files changed
+726
-98
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
238 | | - | |
| 238 | + | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
| 450 | + | |
| 451 | + | |
450 | 452 | | |
451 | 453 | | |
452 | 454 | | |
| |||
0 commit comments