pytensor icon indicating copy to clipboard operation
pytensor copied to clipboard

Do not allow passing None for arbitrary arguments in Function

Open ricardoV94 opened this issue 8 months ago • 0 comments

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.

ricardoV94 avatar Mar 31 '25 09:03 ricardoV94