ILNumerics Ultimate VS

MutableT1, LocalT, InT, OutT, RetT, StorageTshape Property

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
[numpy API] The dimension lengths as ILNumerics vector of length corresponding to NumberOfDimensions.

[ILNumerics Core Module]

Namespace:  ILNumerics.Core.Arrays
Assembly:  ILNumerics.Core (in ILNumerics.Core.dll) Version: (5.5.7503.3146)

public RetArray<long> shape { get; set; }

Property Value

Type: RetArrayInt64

InvalidOperationException if this array is currently shared with multiple instance. For example, if it is in use by an instance of InArrayT as function parameter and the function has not returned yet. Applying the ILNumerics function rules prevent from such situations commonly.
ArgumentException if trying to assign a vector having too many elements, having negative elements, if the new dimensions specified would result in a different number of elements than NumberOfElements, or if the storage of this array cannot be reshaped without copying elements (IsContinuous is false).

This property allows to query the dimension lengths as an ILNumerics vector. The vector returned will have at least (MinNumberOfArrayDimensions) one dimension with the dimension lengths of this array as elements. Numpy scalars return an empty vector.

For mutable arrays the shape can also be changed inplace by assigning to this property. Changing the shape is only allowed for mutable arrays which are in a suitable state: the storage must be continously layed out, the number of elements must not change.

Immutable arrays do not expose a setter property / function for the shape attribute.

[ILNumerics Core Module]

See Also