cgt icon indicating copy to clipboard operation
cgt copied to clipboard

Add type checking to all typ_apply functions

Open joschu opened this issue 9 years ago • 2 comments

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.

joschu avatar Aug 28 '15 03:08 joschu

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?

siddharth-agrawal avatar Sep 05 '15 11:09 siddharth-agrawal

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(...)

joschu avatar Sep 07 '15 19:09 joschu