corewise#
Corewise (per-core) coordinate operations on trees of arrays.
The Euclidean coordinate layer: add/sub/scale/map/sum/dot/norm applied leaf-by-leaf to nested
tuples of cores (NDArrayTree), with no dense-tensor semantics – “corewise” is the semantic
marker for exactly this. Gotcha: corewise_dot/corewise_norm collapse EVERY axis (stacks
included) to a scalar; the corewise_stack_* variants keep a leading stack.
Attributes#
Functions#
|
Add nested objects, X,Y -> X+Y. |
|
Subtract nested objects, X,Y -> X-Y. |
|
Scale nested objects, X,s -> s*X. |
Tree of zeros matching |
|
|
Apply |
|
Negate nested objects, X -> -X. |
|
Sum each array in a nested object along the given axis or axes, X -> sum(X, axis). |
|
Dot product of nested objects, X,Y -> X.Y. |
|
Like corewise_dot, but vectorized over the leading |
|
Scale each leaf by a per-stack-slice factor |
|
Sum each leaf over stack axes, vectorized. |
Norm of nested objects, X -> ||X|| |
|
|
Like |
|
|
|
|
Perform logical not operation on nested objects |
Module Contents#
- NDArrayTree#