Parameter Study Transform#532
Conversation
…ed in it. Not the axis as well.
…n the variable even if it is not initially subscripted.
…ted programming constructs.
|
@inducer This is ready for the first round of review. |
inducer
left a comment
There was a problem hiding this comment.
Some thoughts from a first scroll.
|
|
||
| # {{{ Operations with multiple predecessors. | ||
|
|
||
| def _mult_pred_same_shape(self, expr: Stack | Concatenate) -> tuple[ArraysT, |
There was a problem hiding this comment.
Please think of a better name for this.
There was a problem hiding this comment.
Updated to _broadcast_predecessors_to_same_shape
…the original array.
Co-authored-by: Andreas Klöckner <[email protected]>
| same study then you need to have the same type of | ||
| :class:`ParameterStudyAxisTag`. | ||
| """ | ||
| size: int |
There was a problem hiding this comment.
This information is already contained in the length of the tagged axis (via the array's shape), so I feel like having this would be redundant.
|
|
||
| StudiesT = tuple[ParameterStudyAxisTag, ...] | ||
| ArraysT = tuple[Array, ...] | ||
| KnownShapeType = tuple[IntegralT, ...] |
There was a problem hiding this comment.
Should use same type as Array.shape. I see no issue with parametric axis lengths for non-study axes.
| and so the shape of :math:`\mathbf{Z}` will be | ||
| (:math:`\mathbf{orig\_shape}`, :math:`\mathbf{S1}.size`, :math:`\mathbf{S2}.size`). | ||
|
|
||
| A parameter study is specified in an array by tagging the corresponding axis |
There was a problem hiding this comment.
You get this far in before saying what a parameter study is? 🤔
|
|
||
| study_to_arrays: dict[frozenset[ParameterStudyAxisTag], ArraysT] = {} | ||
|
|
||
| active_studies: set[ParameterStudyAxisTag] = set() |
Creates a mapper to expand a single instance DAG into a multiple independent instance DAG.