# 10 examples of 'math sin python' in Python

Every line of 'math sin python' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Python code is secure.

## All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
``512def Sin(num):513    """Return the sin of a value"""514    return math.sin(float(num))``
``16def sin(angle):17    '''Sine of an angle (in degrees)'''18    return _math.sin(angle * _dg)``
``10def f(x, z): return np.sin(np.sqrt(x ** 2 + z ** 2))``
``14def sin(self, t: np.array = None) -> np.array:15    """Sinus waveform.1617    Parameters18    ----------19    t : array_like, optional20        If not time array is provided, a default buffer sized array21        with a 2*PI period will be used.2223    Returns24    -------25    waveform : ndarray26        Sinusoidal waveform with samples in the normalized range [-1,+1].2728    References29    ----------30    https://docs.scipy.org/doc/numpy/reference/generated/numpy.sin.html3132    See Also33    --------34    square35    sawtooth36    """37    if t is None:38        t = self._wavetime()39    return np.sin(t)``
``692def sin_cuda(a):693694    """ Trigonometric sine of GPUArray elements.695696    Parameters697    ----------698    a : gpuarray699        GPUArray with elements to be operated on.700701    Returns702    -------703    gpuarray704        sin(GPUArray)705706    Examples707    --------708    >>> a = sin_cuda(give_cuda([0, pi/4]))709    [ 0.,  0.70710678]710711    >>> type(a)712    <class 'pycuda.gpuarray.GPUArray'>713714    """715716    return pycuda.cumath.sin(a)``
``106def _sinDeg(angle):107    return math.sin(math.radians(angle))``
``20def cosd(x):21    return cos(radians(x))``
``106def cos(x):107    return mod(x).cos(x)``
``49def t_sin():50    X_train = np.arange(1.0,10,1.0).reshape(-1,1)51    Y_train = np.sin(X_train)52    X_test = np.arange(1.0,10,3.8).reshape(-1,1)53    Y_test = np.sin(X_test)54    return (X_train, Y_train, X_test, Y_test)``
``5def f(t):6    return (0.67*sqrt(t)*cos(2*pi*sqrt(t)), 0.5*sqrt(t)*sin(2*pi*sqrt(t)))``