cgt
cgt copied to clipboard
Add type checking to all typ_apply functions
The functions Op.typ_apply should check the input types and throw human-understandable exceptions when necessary. E.g., Mul22 needs to make sure that both of its inputs have ndim=2 and float or complex types.
I would like to work on this. On doing a simple 'grep', I found that typ_apply is not used widely within the library. How can I test the changes, to make sure that I don't break anything? Also, should I make a list of the ops for which changes are required?
Hi Siddarth, you can run the unit tests to (hopefully) verify that you didn't break anything. typ_apply
isn't explicitly called very often but it's called whenever a new node is created using Result(...)