[ILNumerics Core Module]
Namespace: ILNumerics.Core.Arrays
Assembly: ILNumerics.Core (in ILNumerics.Core.dll) Version: 5.5.0.0 (5.5.7503.3146)
public RetT Reshape<IndT>( BaseArray<IndT> dimLengths, Nullable<StorageOrders> order = null )
Parameters
- dimLengths
- Type: ILNumericsBaseArrayIndT
Numeric array with target dimension lengths. null or an empty array creates a (0-D) scalar if possible. - order (Optional)
- Type: SystemNullableStorageOrders
Storage order for reading and writing
Type Parameters
- IndT
Return Value
Type: RetTReshaped array.
Exception | Condition |
---|---|
ArgumentException | if dimLengths is longer than the maximum number of allowed dimensions: MaxNumberOfDimensions. |
This function is provided for situations where the size / shape of the target array is computed for unknown number of dimensions. Here, it is convenient to provide the dimension lengths as a single array parameter.
Empty dimLengths leads to the creation of a 0-D scalar array, respecting the current settings of MinNumberOfArrayDimensions, though.
Elements of dimLengths are interpreted as the target dimension lengths for the array returned.
All but one element in dimLengths must be positive. If one negative element is found the function will infer the required dimension length for the corresponding dimension from the other elements provided.
[ILNumerics Core Module]