cos

Syntax

cos(X)

Details

Applies the function of cos to X.

Note:
  • Equivalent to NumPy's numpy.cos, except that it only accepts a single parameter, X, and does not support parameters like out or where in numpy.cos.
  • Equivalent to TA-Lib's COS function. The difference is that DolphinDB cos accepts scalars, vectors, and matrices as input, whereas TA-Lib COS is primarily designed for one-dimensional NumPy arrays and does not support scalar or matrix inputs.

Parameters

X is a scalar/vector/matrix.

Returns

A scalar/vector/matrix of type DOUBLE.