Skip to content

feat(numtools): sym<->full input check, ... ability#66

Merged
jrwrigh merged 3 commits into
masterfrom
feat/tensor_transform_err
Nov 16, 2021
Merged

feat(numtools): sym<->full input check, ... ability#66
jrwrigh merged 3 commits into
masterfrom
feat/tensor_transform_err

Conversation

@jrwrigh

@jrwrigh jrwrigh commented Nov 16, 2021

Copy link
Copy Markdown
Member

symmetric2FullTensor and full2SymmetricTensor were changed by:

  • Adding a input check to verify that the incoming array was of size (...,6) or (...3,3), respectively
  • Add ability for the input array to have arbitrary leading dimensionality.
    • So an array of shape (10,100,6) could be input and transformed to (10,100,3,3)
  • Added tests to verify all the above changes.

 - Check to ensure that the appropriately sized index is passed to
   the routines
 - Make functions more flexible by allowing arrays of index (...,6) and
   (...,3,3)
 - Also converted those tests to a class for better organization
 - `assert` is a statement, not a function. So `assert(True)` asserts
   that a tuple with contents "True". Instead, use `assert True`.
 - This change also allows some nicer features of pytest to explicitly
   tell you what things are different.
@jrwrigh jrwrigh changed the title feat(numtools): Add errors to tensor transform, make more flexible with ... feat(numtools): sym<->full input check, ... ability Nov 16, 2021
@jrwrigh jrwrigh merged commit 9996ed5 into master Nov 16, 2021
@jrwrigh jrwrigh deleted the feat/tensor_transform_err branch November 16, 2021 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant