Is there a better way to get `nin` than checking for `ufunc.nin`? Since what we are calling ufunc here could actually be  some other `PyObject`.