ILNumerics - Technical Application Development
Assembly: ILNumerics.numpy (in ILNumerics.numpy.dll) Version: 5.5.0.0 (5.5.7503.3146)
[numpy API] Replaces a single element of this array at the specified location.
[ILNumerics numpy Module]
Namespace: ILNumerics
Assembly: ILNumerics.numpy (in ILNumerics.numpy.dll) Version: 5.5.0.0 (5.5.7503.3146)
Syntax
public static void itemset<T1>( this Mutable<T1, Array<T1>, InArray<T1>, OutArray<T1>, RetArray<T1>, Storage<T1>> A, InArray<long> dims, T1 value )
Parameters
- A
- Type: ILNumerics.Core.ArraysMutableT1, ArrayT1, InArrayT1, OutArrayT1, RetArrayT1, StorageT1
The mutable ILNumerics n-dim array. - dims
- Type: ILNumericsInArrayInt64
Index array addressing the position of the element in A to replace. - value
- Type: T1
The single value to be copied to the element at the specified position.
Type Parameters
- T1
- Element type.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type MutableT1, ArrayT1, InArrayT1, OutArrayT1, RetArrayT1, StorageT1. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Exceptions
Exception | Condition |
---|---|
IndexOutOfRangeException | if an index exceeds the allowed range of the corresponding dimension. |
Remarks
Elements in dims can be negative and must evaluate to an existing element.
This function does not support expanding the array for indices outside of the existing range (as SetValue() does). An exception will be thrown instead when addressing any non-existing element.
For dims being null or empty the first element of A is addressed. For numpy scalars A the only element stored is replaced.
If dims has a length of 1 the only element in dims is considered the sequential /linear index into the flattened version of A.
This function handles arbitrary storage orders.
[ILNumerics numpy Module]
See Also
Reference
[!:ILNumerics.ExtensionMethods.SetValue<T1, LocalT, InT, OutT, RetT, StorageT>(Mutable<T1, LocalT, InT, OutT, RetT, StorageT>, T1, long, long, long, long, long, long, long)]