scico icon indicating copy to clipboard operation
scico copied to clipboard

Reduce code duplication in LinOp tests

Open Michael-T-McCann opened this issue 4 months ago • 0 comments

Many LinOps have tests for scalar multiplication, i.e., that a * (H @ x) = (a * H) @ x. Right now, this involves code duplication, e.g., https://github.com/lanl/scico/blob/1a66887a03ad4cca5dfa58dfa86386f1536926ba/scico/test/linop/test_circconv.py#L74-L87 versus https://github.com/lanl/scico/blob/1a66887a03ad4cca5dfa58dfa86386f1536926ba/scico/test/linop/test_diag.py#L146-L158

Can we create a standard function to test scaling (and other similar LinOp properties) rather than copy/pasting variants of this?

Michael-T-McCann avatar Feb 09 '24 16:02 Michael-T-McCann