Update _ssmatrix and _check_shape for consistent usage #1116
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prompted by issue #1100, this PR updates the
_ssmatrixand_check_shapefunctions to make their usage more consistent and remove legacy calls that are no longer needed.Changes:
_ssmatrixto allow checking for square matrices and row/col dimensions, with improved error messages that include the name of the matrix generating the error._ssmatrixfor uniform processing._ssmatrixon outputs of functions inmateqn.pyand other places. These calls were used back when we supported the NumPymatrixclass and are no longer required.ackerto use the matrices generated by_ssmatrix._check_shapeto have a call signature that is more conistent with_ssmatrix: the matrix and dimensions are first, followed by optional keywords, with anamekeyword for the name of the matrix being checked (for error messages)._check_shapeinstatefbk.pyand replaced with a call tomateqn._check_shape.