diff --git a/pyop2/codegen/representation.py b/pyop2/codegen/representation.py index 285525078..5277094d9 100644 --- a/pyop2/codegen/representation.py +++ b/pyop2/codegen/representation.py @@ -285,7 +285,7 @@ def __init__(self, a, b): @cached_property def dtype(self): a, b = self.children - return numpy.find_common_type([], [a.dtype, b.dtype]) + return numpy.result_type(a.dtype, b.dtype) class Sum(Scalar): @@ -299,7 +299,7 @@ def __init__(self, a, b): @cached_property def dtype(self): a, b = self.children - return numpy.find_common_type([], [a.dtype, b.dtype]) + return numpy.result_type(a.dtype, b.dtype) class Product(Scalar): @@ -313,7 +313,7 @@ def __init__(self, a, b): @cached_property def dtype(self): a, b = self.children - return numpy.find_common_type([], [a.dtype, b.dtype]) + return numpy.result_type(a.dtype, b.dtype) class QuotientBase(Scalar): @@ -327,7 +327,7 @@ def __init__(self, a, b): @cached_property def dtype(self): a, b = self.children - return numpy.find_common_type([], [a.dtype, b.dtype]) + return numpy.result_type(a.dtype, b.dtype) class Quotient(QuotientBase):