Closed wuhu closed 2 years ago
Yes, it looks like it is set in padl/wrap.py
# Special checks
if isinstance(fun, np.ufunc):
wrapper._pd_number_of_inputs = fun.nin
However, I'm not sure if _pd_number_of_inputs
should be set in more places.
yes, it is used for special case of numpy.ufunc
where it is not possible to inspect the signature directly. This allows for checking whether the args for FunctionTransform that wraps ufunc
should be unpacked or not.
In Wrap.py https://github.com/lf1-io/padl/blob/8813a8785faac8f67aaf1a2974fa72d7754158f3/padl/wrap.py#L70
Transforms https://github.com/lf1-io/padl/blob/8813a8785faac8f67aaf1a2974fa72d7754158f3/padl/transforms.py#L701
FunctionTransforms https://github.com/lf1-io/padl/blob/8813a8785faac8f67aaf1a2974fa72d7754158f3/padl/transforms.py#L1164
Ok, thanks.
@jasonkhadka I don't see it set to anything other than
None
.