nutils
nutils copied to clipboard
add Pointwise.return_type
This patch adds the return_type class method to evaluable.Pointwise which defines the output dtype for given input dtypes. This replaces the constructor logic that evaluated evalf in numpy.ones, which is problematic as one may not be in the evaluable range (e.g. arctanh). Moreover, the new method allows evaluable to deviate from Numpy's logic. Finally, the new function replaces all constructor definitions that served only to check input types (e.g. Greater, Less).