# cf.Data.cos¶

Data.cos(inplace=False, i=False)[source]

Take the trigonometric cosine of the data array in place.

Units are accounted for in the calculation. If the units are not equivalent to radians (such as Kelvin) then they are treated as if they were radians. For example, the the cosine of 90 degrees_east is 0.0, as is the sine of 1.57079632 kg m-2.

The output units are changed to ‘1’ (nondimensionsal).

Parameters: inplace: bool, optional If True then do the operation in-place and return None. i: deprecated at version 3.0.0 Use inplace parameter instead.

Examples:

>>> d.Units
<Units: degrees_east>
>>> print(d.array)
[[-90 0 90 --]]
>>> d.cos()
>>> d.Units
<Units: 1>
>>> print(d.array)
[[0.0 1.0 0.0 --]]

>>> d.Units
<Units: m s-1>
>>> print(d.array()
[[1 2 3 --]]
>>> d.cos()
>>> d.Units
<Units: 1>
>>> print9d.array)
[[0.540302305868 -0.416146836547 -0.9899924966 --]]
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.8706968426704407, "perplexity": 14268.500869202024}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 20, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2022-49/segments/1669446711712.26/warc/CC-MAIN-20221210042021-20221210072021-00274.warc.gz"}