> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# cos class

**Namespace:** [Ans.DataProcessing.operators.math](https://developer.synopsys.com/docs/dpf/dpf-mechanical/api/Ans.DataProcessing/operators/math)

## Summary

Computes element-wise cosine function on field data: cos(field\[i]).

available inputs: `field` (Field, FieldsContainer)

available outputs: `field` (Field)

## Example

```python theme={null}
op = cos()

op = cos(field=my_field)
```

## Class Information

| Property | Value |
| - | - |
| Namespace | `Ans.DataProcessing.operators.math` |
| Assembly | `Ans_Dpf_Native_dll_cs` |
| Base Class | `Ans.DataProcessing.internal_objects.BaseOperator` |

## Inputs

### field

Field or fields container containing numeric data for cosine calculation

**Type:** *LinkableInput*

## Outputs

### field

Field with cosine values applied element-wise to input data

**Type:** *LinkableOutput*

## Constructors

#### Constructor

```python theme={null}
cos()
```

#### Constructor

```python theme={null}
cos(field, config)
```

**Parameters:**

* `field` (*object*)
* `config` (*OperatorConfig*)

#### Constructor

```python theme={null}
cos(config)
```

**Parameters:**

* `config` (*OperatorConfig*)

## Methods

## Properties

#### inputs

**Type:** *InputSpec*

```python theme={null}
# Get or set the property
value = obj.inputs
obj.inputs = new_value
```

#### outputs

**Type:** *OutputSpec*

```python theme={null}
# Get or set the property
value = obj.outputs
obj.outputs = new_value
```

#### defaultConfig

**Type:** *Config*

```python theme={null}
# Get the property (read-only)
value = obj.defaultConfig
```
