jax.numpy.greater_equal
Contents
jax.numpy.greater_equal#
- jax.numpy.greater_equal(x,y,/)[source]#
Return element-wise truth value of
x>=y.JAX implementation of
numpy.greater_equal.- Parameters:
x (ArrayLike) – input array or scalar.
y (ArrayLike) – input array or scalar.
xandymust either have same shape or bebroadcast compatible.
- Returns:
An array containing boolean values.
Trueif the elements ofx>=y,andFalseotherwise.- Return type:
See also
jax.numpy.less_equal(): Returns element-wise truth value ofx<=y.jax.numpy.greater(): Returns element-wise truth value ofx>y.jax.numpy.less(): Returns element-wise truth value ofx<y.
Examples
Scalar inputs:
>>>jnp.greater_equal(4,7)Array(False, dtype=bool, weak_type=True)
Inputs with same shape:
>>>x=jnp.array([2,5,-1])>>>y=jnp.array([-6,4,3])>>>jnp.greater_equal(x,y)Array([ True, True, False], dtype=bool)
Inputs with broadcast compatibility:
>>>x1=jnp.array([[3,-1,4],...[5,9,-6]])>>>y1=jnp.array([-1,4,2])>>>jnp.greater_equal(x1,y1)Array([[ True, False, True], [ True, True, False]], dtype=bool)
Contents
