pytensor
pytensor copied to clipboard
Do not allow passing None for arbitrary arguments in Function
Description
https://github.com/pymc-devs/pytensor/blob/3af923ba1593320cf0a5bfb29a04263406652731/pytensor/compile/function/types.py#L938-L941
I read the discussion, it's not convincing, and even less now that we have other backends besides the C. If someone wants an Op to accept either None or something else they should define a specific type where None or the something else is allowed. An example of this could be size for RandomVariables or start for MakeSlice.