Skip to content
This repository has been archived by the owner on Nov 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #721 from OP2/JDBetteridge/numpy2_rebase
Browse files Browse the repository at this point in the history
Support numpy 2.0
  • Loading branch information
JDBetteridge authored Jun 7, 2024
2 parents 7bef38f + c97a043 commit a52b998
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyop2/codegen/representation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand All @@ -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):
Expand Down

0 comments on commit a52b998

Please sign in to comment.