pymc-devs / pytensor

PyTensor allows you to define, optimize, and efficiently evaluate mathematical expressions involving multi-dimensional arrays.
https://pytensor.readthedocs.io
Other
340 stars 101 forks source link

Add type hints / documentation for `mode` argument #690

Open ricardoV94 opened 6 months ago

ricardoV94 commented 6 months ago

Description

As discussed in https://github.com/pymc-devs/pymc/pull/7212#discussion_r1553967791 it's not clear what the signature / type is.

Besides a Mode object there is a set of strings that are allowed: https://github.com/pymc-devs/pytensor/blob/a76172ee6a9753266150fc7bac4dd66906967a26/pytensor/compile/mode.py#L484-L534

OriolAbril commented 6 months ago

I have found:

maybe its better to link to the first one for docstrings?