Skip to content

Commit 2bcdaa9

Browse files
committed
1 parent a243926 commit 2bcdaa9

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

src/flint/types/_gr.pyx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,47 @@ cdef class gr_ctx(flint_ctx):
779779
def max(self, x, y) -> gr:
780780
return self._max(self(x), self(y))
781781
782+
###
783+
# Array-API wrappers
784+
785+
def divide(self, x, y) -> gr:
786+
return self.div(x, y)
787+
788+
def greater(self, x, y):
789+
return self.gt(x, y)
790+
791+
def greater_equal(self, x, y):
792+
return self.ge(x, y)
793+
794+
def less(self, x, y):
795+
return self.lt(x, y)
796+
797+
def less_equal(self, x, y):
798+
return self.le(x, y)
799+
800+
def imag(self, x):
801+
return self.im(x)
802+
803+
def real(self, x):
804+
return self.re(x)
805+
806+
def maximum(self, x, y):
807+
return self.max(x, y)
808+
809+
def minimum(self, x, y):
810+
return self.min(x, y)
811+
812+
def multiply(self, x, y):
813+
return self.mul(x, y)
814+
815+
def negative(self, x):
816+
return self.neg(x)
817+
818+
def not_equal(self, x, y):
819+
eq = self.equal(x, y)
820+
if eq is None:
821+
return None
822+
return not eq
782823
783824
cdef class gr_scalar_ctx(gr_ctx):
784825
"""Base class for all scalar contexts."""

0 commit comments

Comments
 (0)