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

Support numpy 2.0 #721

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading