Python numpy.core.umath.cos() Examples

The following are code examples for showing how to use numpy.core.umath.cos(). They are from open source Python projects. You can vote up the examples you like or vote down the ones you don't like.

Example 1
Project: LaserTOF   Author: kyleuckert   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 2
Project: LaserTOF   Author: kyleuckert   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 3
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 4
Project: FX-RER-Value-Extraction   Author: tsKenneth   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 5
Project: recruit   Author: Frank-qlu   File: core.py    Apache License 2.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 6
Project: recruit   Author: Frank-qlu   File: core.py    Apache License 2.0 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 7
Project: att   Author: Centre-Alt-Rendiment-Esportiu   File: core.py    GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 8
Project: att   Author: Centre-Alt-Rendiment-Esportiu   File: core.py    GNU General Public License v3.0 5 votes vote down vote up
def __call__ (self, x):
        "Executes the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 9
Project: FUTU_Stop_Loss   Author: BigtoC   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 10
Project: FUTU_Stop_Loss   Author: BigtoC   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 11
Project: MARRtino-2.0   Author: DaniAffCH   File: core.py    GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 12
Project: MARRtino-2.0   Author: DaniAffCH   File: core.py    GNU General Public License v3.0 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 13
Project: auto-alt-text-lambda-api   Author: abhisuri97   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 14
Project: auto-alt-text-lambda-api   Author: abhisuri97   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 15
Project: vnpy_crypto   Author: birforce   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 16
Project: vnpy_crypto   Author: birforce   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 17
Project: ble5-nrf52-mac   Author: tomasero   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 18
Project: ble5-nrf52-mac   Author: tomasero   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 19
Project: Computable   Author: ktraunmueller   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 20
Project: Computable   Author: ktraunmueller   File: core.py    MIT License 5 votes vote down vote up
def __call__ (self, x):
        "Executes the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 21
Project: Computable   Author: ktraunmueller   File: ma.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 22
Project: Computable   Author: ktraunmueller   File: ma.py    MIT License 5 votes vote down vote up
def __call__ (self, x):
        "Execute the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 23
Project: poker   Author: surgebiswas   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 24
Project: poker   Author: surgebiswas   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 25
Project: P3_image_processing   Author: latedude2   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 26
Project: P3_image_processing   Author: latedude2   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 27
Project: pycopia   Author: kdart   File: physical_quantities.py    Apache License 2.0 5 votes vote down vote up
def cos(self):
    if self.unit.isAngle():
      return umath.cos(self.value * self.unit.conversionFactorTo(_unit_table['rad']))
    else:
      raise TypeError('Argument of cos must be an angle') 
Example 28
Project: GraphicDesignPatternByPython   Author: Relph1119   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 29
Project: GraphicDesignPatternByPython   Author: Relph1119   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 30
Project: pylgrim   Author: kirienko   File: ecef.py    GNU General Public License v3.0 5 votes vote down vote up
def lat_lon_alt_to_ecef_xyz(R):
    """
    see [1] p. 512
    :param R: (φ,θ,h) -- lat [deg], lon [deg], alt in WGS84 (numpy array)
    :return:  (X,Y,Z) -- coordinates in ECEF (numpy array)
    """
    # WGS 84 constants
    a2 = 6378137.0 ** 2  # Equatorial Radius [m]
    b2 = 6356752.314245 ** 2  # Polar Radius [m]
    radius = lambda phi: sqrt(a2 * (cos(phi)) ** 2 + b2 * (sin(phi)) ** 2)
    f, t, h = np.deg2rad(R[0]), np.deg2rad(R[1]), R[2]
    X = cos(t) * cos(f) * (h + a2 / radius(f))
    Y = sin(t) * cos(f) * (h + a2 / radius(f))
    Z = sin(f) * (h + b2 / radius(f))
    return np.array([X, Y, Z]) 
Example 31
Project: pylgrim   Author: kirienko   File: ecef.py    GNU General Public License v3.0 5 votes vote down vote up
def sat_in_enu(R_u, R_sat):
    """
    Satellite coordinates in ENU at users position R_u
    :param R_u:   (X,Y,Z) -- user's coordinates in ECEF (numpy array)
    :param R_sat: (X,Y,Z) -- satellite's coordinates in ECEF (numpy array)
    :return: unit vector of the direction to the satellite in local `east, north, up` coords
    See [1] p. 522
    """
    if isinstance(R_sat, list):  R_sat = np.array(R_sat)
    R = R_sat - R_u
    phi_theta_h = ecef_to_lat_lon_alt(R_u, deg=False)
    # coordinate transformation matrix from ECEF to ENU:
    sin_p, sin_t = map(sin, phi_theta_h[:2])
    cos_p, cos_t = map(cos, phi_theta_h[:2])
    
    C_ecef_to_enu = matrix([[-sin_t, cos_t, 0],
                            [-sin_p * cos_t, -sin_p * sin_t, cos_p],
                            [cos_p * cos_t, cos_p * sin_t, sin_p]])
    # coordinate origin shift vector from ECEF to local ENU:
    # S_enu = matrix([[R_u[0] * sin_t - R_u[1] * cos_t],
    #                 [R_u[0] * sin_p * cos_t - R_u[1] * sin_p * sin_t - R_u[2] * cos_p],
    #                 [-R_u[0] * cos_p * cos_t - R_u[1] * cos_p * sin_t - R_u[2] * sin_t]])

    X_enu = C_ecef_to_enu * R.reshape((3, 1))# + S_enu
    # return normalized vector:
    return (X_enu / norm(X_enu)).flatten().getA()[0] 
Example 32
Project: 3dprinteros-client   Author: panasevychol   File: core.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 33
Project: 3dprinteros-client   Author: panasevychol   File: core.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def __call__ (self, x):
        "Executes the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 34
Project: 3dprinteros-client   Author: panasevychol   File: core.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 35
Project: 3dprinteros-client   Author: panasevychol   File: core.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def __call__ (self, x):
        "Executes the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 36
Project: predictive-maintenance-using-machine-learning   Author: awslabs   File: core.py    Apache License 2.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 37
Project: predictive-maintenance-using-machine-learning   Author: awslabs   File: core.py    Apache License 2.0 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 38
Project: fund   Author: Frank-qlu   File: core.py    Apache License 2.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 39
Project: fund   Author: Frank-qlu   File: core.py    Apache License 2.0 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 40
Project: pySINDy   Author: luckystarufo   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 41
Project: pySINDy   Author: luckystarufo   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 42
Project: linear_neuron   Author: uglyboxer   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 43
Project: linear_neuron   Author: uglyboxer   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 44
Project: facethin   Author: ParkerGod   File: core.py    GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 45
Project: facethin   Author: ParkerGod   File: core.py    GNU General Public License v3.0 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 46
Project: islam-buddy   Author: hamir   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 47
Project: islam-buddy   Author: hamir   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 48
Project: mxnet-lambda   Author: awslabs   File: core.py    Apache License 2.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 49
Project: mxnet-lambda   Author: awslabs   File: core.py    Apache License 2.0 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 50
Project: Deribit_funding_rate_indicator   Author: Dimasik007   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 51
Project: Deribit_funding_rate_indicator   Author: Dimasik007   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 52
Project: psychrometric-chart-makeover   Author: buds-lab   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 53
Project: psychrometric-chart-makeover   Author: buds-lab   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 54
Project: wine-ml-on-aws-lambda   Author: pierreant   File: core.py    Apache License 2.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 55
Project: wine-ml-on-aws-lambda   Author: pierreant   File: core.py    Apache License 2.0 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 56
Project: linux-cross-gcc   Author: nmercier   File: core.py    BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 57
Project: linux-cross-gcc   Author: nmercier   File: core.py    BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 58
Project: SignLanguage_ML   Author: mareep-raljodid   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 59
Project: SignLanguage_ML   Author: mareep-raljodid   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 60
Project: ImageFusion   Author: pfchai   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 61
Project: ImageFusion   Author: pfchai   File: core.py    MIT License 5 votes vote down vote up
def __call__ (self, x):
        "Executes the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 62
Project: sarah   Author: ChonchoFronto   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 63
Project: sarah   Author: ChonchoFronto   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 64
Project: honours_project   Author: JFriel   File: core.py    GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 65
Project: honours_project   Author: JFriel   File: core.py    GNU General Public License v3.0 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 66
Project: honours_project   Author: JFriel   File: core.py    GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 67
Project: honours_project   Author: JFriel   File: core.py    GNU General Public License v3.0 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 68
Project: Blackjack-Tracker   Author: martinabeleda   File: core.py    MIT License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 69
Project: Blackjack-Tracker   Author: martinabeleda   File: core.py    MIT License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 70
Project: Splunking-Crime   Author: nccgroup   File: core.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 71
Project: Splunking-Crime   Author: nccgroup   File: core.py    GNU Affero General Public License v3.0 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 72
Project: PYPIC   Author: max614   File: core.py    BSD 2-Clause "Simplified" License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 73
Project: PYPIC   Author: max614   File: core.py    BSD 2-Clause "Simplified" License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        with np.errstate(invalid='ignore'):
            return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 74
Project: PYPIC   Author: max614   File: core.py    BSD 2-Clause "Simplified" License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 75
Project: PYPIC   Author: max614   File: core.py    BSD 2-Clause "Simplified" License 5 votes vote down vote up
def __call__(self, x):
        "Executes the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 76
Project: PYPIC   Author: max614   File: core.py    BSD 2-Clause "Simplified" License 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 77
Project: senior-design   Author: james-tate   File: core.py    GNU General Public License v2.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 78
Project: senior-design   Author: james-tate   File: core.py    GNU General Public License v2.0 5 votes vote down vote up
def __call__ (self, x):
        "Executes the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps) 
Example 79
Project: senior-design   Author: james-tate   File: ma.py    GNU General Public License v2.0 5 votes vote down vote up
def __init__(self, eps):
        "domain_tan(eps) = true where abs(cos(x)) < eps)"
        self.eps = eps 
Example 80
Project: senior-design   Author: james-tate   File: ma.py    GNU General Public License v2.0 5 votes vote down vote up
def __call__ (self, x):
        "Execute the call behavior."
        return umath.less(umath.absolute(umath.cos(x)), self.eps)