> ## 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.

# scalars_to_field class

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

scalars\_to\_field()

scalars\_to\_field(double\_or\_vector\_double: object, unit: object, location: object, num\_entities: object, num\_components: object, scoping: object, config: OperatorConfig)

scalars\_to\_field(config: OperatorConfig)

## Class Information

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

## Inputs

### double\_or\_vector\_double

Data of the field. Default is 0-field. Specify a double to create a field with uniform values, or a vector for explicit data per entity

**Type:** *LinkableInput*

### unit

Unit symbol (m, Hz, kg, ...). Default is dimensionless

**Type:** *LinkableInput*

### location

Location of the field: 'Nodal', 'ElementalNodal', 'Elemental', etc. Default is 'numeric'

**Type:** *LinkableInput*

### num\_entities

Number of field entities. Default is 1, or the size of the scoping if provided

**Type:** *LinkableInput*

### num\_entity

Deprecated alias of: num\_entities

**Type:** *LinkableInput*

### num\_components

Number of field components per entity. Default is 1 for scalar, >1 for vector

**Type:** *LinkableInput*

### num\_comp

Deprecated alias of: num\_components

**Type:** *LinkableInput*

### scoping

Scoping defining entity IDs and locations. If provided, overrides num\_entities

**Type:** *LinkableInput*

## Outputs

### field

Generated field with specified data and properties

**Type:** *LinkableOutput*

## Constructors

#### Constructor

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

#### Constructor

```python theme={null}
scalars_to_field(double_or_vector_double, unit, location, num_entities, num_components, scoping, config)
```

**Parameters:**

* `double_or_vector_double` (*object*)
* `unit` (*object*)
* `location` (*object*)
* `num_entities` (*object*)
* `num_components` (*object*)
* `scoping` (*object*)
* `config` (*OperatorConfig*)

#### Constructor

```python theme={null}
scalars_to_field(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
```
