Python numpy.core.umath.greater_equal() Examples

The following are 3 code examples for showing how to use numpy.core.umath.greater_equal(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

You may check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module numpy.core.umath , or try the search function .

Example 1
Project: Computable   Author: ktraunmueller   File: ma.py    License: MIT License 5 votes vote down vote up
def __ge__(self, other):
        return greater_equal(self, other) 
Example 2
Project: Computable   Author: ktraunmueller   File: ma.py    License: MIT License 5 votes vote down vote up
def masked_greater_equal(x, value, copy=1):
    "masked_greater_equal(x, value) = x masked where x >= value"
    return masked_where(greater_equal(x, value), x, copy) 
Example 3
Project: Computable   Author: ktraunmueller   File: ma.py    License: MIT License 5 votes vote down vote up
def masked_inside(x, v1, v2, copy=1):
    """x with mask of all values of x that are inside [v1,v2]
       v1 and v2 can be given in either order.
    """
    if v2 < v1:
        t = v2
        v2 = v1
        v1 = t
    d = filled(x, 0)
    c = umath.logical_and(umath.less_equal(d, v2), umath.greater_equal(d, v1))
    m = mask_or(c, getmask(x))
    return array(d, mask = m, copy=copy)