# Reshape Array (DP\_RSH)

Reshaping Arrays is a functionality used in data processing to transform data into a different shape. This can be useful when working with data that needs to be reorganized to be used in an analysis or modeling. The reshaping operation involves changing the number of dimensions, the size of each dimension, or both, of an input array to obtain a new output array with a different shape.

To reshape an array, you need to specify the input array and the desired shape of the output array. The shape of the output array can be defined using a tuple or a list of integers representing the size of each dimension.

## Sample Request

This request reshapes the passed data to a specified dimension

```javascript
{
    "project_id": 41,
    "block_id": 10,
    "parent_id": 9,
    "function_code": "DP_RSH",
    "args": {
        "data": "",
        "dimensions": [2, 21000]
    }
}
```

## Reshaping Arrays

## Reshapes an array based on specified dimensions

<mark style="color:green;">`POST`</mark> `https://autogon.ai/api/v1/engine/start`

#### Request Body

| Name                                             | Type   | Description                                                                                                                         |
| ------------------------------------------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| project\_id<mark style="color:red;">\*</mark>    | int    | current project ID                                                                                                                  |
| parent\_id<mark style="color:red;">\*</mark>     | int    | parent block ID                                                                                                                     |
| block\_id<mark style="color:red;">\*</mark>      | int    | current block ID                                                                                                                    |
| function\_code<mark style="color:red;">\*</mark> | String | block's function code                                                                                                               |
| data<mark style="color:red;">\*</mark>           | String | The input data to be reshaped. This can be a URL to a CSV file                                                                      |
| args                                             | object | block arguments                                                                                                                     |
| dimensions<mark style="color:red;">\*</mark>     | Array  | The new dimensions to reshape the input data to. The number of dimensions must be the same as the number of axes in the input data. |

{% tabs %}
{% tab title="200: OK Reshape Array Successful" %}

```javascript
{
    "status": "true",
    "message": {
        "id": 3,
        "project": 1,
        "block_id": 7,
        "parent_id": 6,
        "dataset_url": "",
        "x_value_url": "",
        "y_value_url": ""
    }
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Python" %}

```
// Some code
```

{% endtab %}

{% tab title="Node" %}

```
projectId = 1
parentId = 6
blockId = 7

client.array_reshaping(projectId, parentId, blockId, {

```

{% endtab %}
{% endtabs %}
