Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update greater_equal function #22787

Merged
merged 1 commit into from
Aug 30, 2023
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
28 changes: 2 additions & 26 deletions ivy/functional/ivy/elementwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -3075,8 +3075,8 @@ def greater(
@handle_array_function
@handle_device_shifting
def greater_equal(
x1: Union[float, ivy.Array, ivy.NativeArray],
x2: Union[float, ivy.Array, ivy.NativeArray],
x1: Union[ivy.Array, ivy.NativeArray],
x2: Union[ivy.Array, ivy.NativeArray],
/,
*,
out: Optional[ivy.Array] = None,
Expand Down Expand Up @@ -3141,30 +3141,6 @@ def greater_equal(
[1.],
[0.]]])

With a mix of :class:`ivy.Array` and :class:`ivy.NativeArray` inputs:

>>> x = ivy.array([1, 2, 3])
>>> y = ivy.native_array([4, 5, 0])
>>> z = ivy.greater_equal(x, y)
>>> print(z)
ivy.array([False, False, True])

With a mix of :class:`ivy.Array` and :class:`ivy.Container` inputs:

>>> x = ivy.array([[5.1, 2.3, -3.6]])
>>> y = ivy.Container(a=ivy.array([[4.], [5.], [6.]]),
... b=ivy.array([[5.], [6.], [7.]]))
>>> z = ivy.greater_equal(x, y)
>>> print(z)
{
a: ivy.array([[True, False, False],
[True, False, False],
[False, False, False]]),
b: ivy.array([[True, False, False],
[False, False, False],
[False, False, False]])
}

With :class:`ivy.Container` input:

>>> x = ivy.Container(a=ivy.array([4, 5, 6]),b=ivy.array([2, 3, 4]))
Expand Down
Loading