ILNumerics Ultimate VS

ExtensionMethodsitemsetT1 Method (MutableT1, ArrayT1, InArrayT1, OutArrayT1, RetArrayT1, StorageT1, InArrayInt64, T1)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
[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.7503.3146)

public static void itemset<T1>(
	this Mutable<T1, Array<T1>, InArray<T1>, OutArray<T1>, RetArray<T1>, Storage<T1>> A,
	InArray<long> dims,
	T1 value


Type: ILNumerics.Core.ArraysMutableT1, ArrayT1, InArrayT1, OutArrayT1, RetArrayT1, StorageT1
The mutable ILNumerics n-dim array.
Type: ILNumericsInArrayInt64
Index array addressing the position of the element in A to replace.
Type: T1
The single value to be copied to the element at the specified position.

Type Parameters

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).

IndexOutOfRangeException if an index exceeds the allowed range of the corresponding dimension.

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


[!:ILNumerics.ExtensionMethods.SetValue<T1, LocalT, InT, OutT, RetT, StorageT>(Mutable<T1, LocalT, InT, OutT, RetT, StorageT>, T1, long, long, long, long, long, long, long)]