# Method reshapeView

#### static member reshapeView: int64 list -> Tensor<'T> -> Tensor<'T>

Creates a reshaped view of the tensor (without copying).

##### Declaration

`static member reshapeView: shp:int64 list -> a:Tensor<'T> -> Tensor<'T>`

##### Parameters

Type | Name | Description |
---|---|---|

int64 list | shp | The target shape. |

Tensor<'T> | a | The tensor to operate on. |

##### Returns

Type | Description |
---|---|

Tensor<'T> | A reshaped view of the original tensor. |

##### Remarks

Changes the shape of the tensor to the specified shape.
The total number of elements must not change.
One dimension of the `shp`

can be specified as val Remainder,
in which case the size of that dimension is inferred automatically.

If a reshape is not possible without copying the data of the tensor, an exception is raised. To avoid this, use static member tryReshapeView: int64 list -> Tensor<'T> -> Tensor<'T> option instead.

The operation returns a view of the original tensor and shares its storage. Modifications done to the returned tensor will affect the original tensor. Also, modifying the orignal tensor will affect the view.