Python Practice › NumPy Programs › Program 10

Element-wise greater or equal

EasyNumPy Programs · 10 of 100

Write a NumPy program for an element-wise “greater or equal” comparison.

Advertisement
Input
[6, 4], [6, 3]
Output
[ True  True]

Approach

  1. np.greater_equal.

Solution

Python
import numpy as npprint(np.greater_equal([6, 4], [6, 3]))
Output
[ True  True]
Advertisement

Learn the concept

New to this topic? Read the lesson, then come back.

More numpy programs

← All 100 NumPy Programs