Python Practice › NumPy Programs › Program 10
Element-wise greater or equal
Write a NumPy program for an element-wise “greater or equal” comparison.
Input
[6, 4], [6, 3]
Output
[ True True]
Approach
np.greater_equal.
Solution
import numpy as npprint(np.greater_equal([6, 4], [6, 3]))Output
[ True True]
Learn the concept
New to this topic? Read the lesson, then come back.