ILNumerics Ultimate VS

ExtensionMethodsrepeatT1, LocalT, InT, OutT, RetT, StorageT Method (ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT, Int64, NullableUInt32)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
[numpy API] Repeat elements along a flattened array or a specific axis.

[ILNumerics numpy Module]

Namespace:  ILNumerics
Assembly:  ILNumerics.numpy (in ILNumerics.numpy.dll) Version: (5.5.7503.3146)

public static RetT repeat<T1, LocalT, InT, OutT, RetT, StorageT>(
	this ConcreteArray<T1, LocalT, InT, OutT, RetT, StorageT> A,
	long repeats,
	Nullable<uint> axis = null
where T1 : struct, new()
where LocalT : Mutable<T1, LocalT, InT, OutT, RetT, StorageT>
where InT : Immutable<T1, LocalT, InT, OutT, RetT, StorageT>
where OutT : Mutable<T1, LocalT, InT, OutT, RetT, StorageT>
where RetT : ConcreteRetArray<T1, LocalT, InT, OutT, RetT, StorageT>
where StorageT : new(), BaseStorage<T1, LocalT, InT, OutT, RetT, StorageT>


Type: ILNumerics.Core.ArraysConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT
The array storing the elements to be repeated.
Type: SystemInt64
Number of repetitions for all elements (scalar value).
axis (Optional)
Type: SystemNullableUInt32
[Optional] The working dimension. Default: (null) flatten A and repeat all values along dimension #0.

Type Parameters

Element type of A.
(subtype of A)
(subtype of A)
(subtype of A)
(subtype of A)
(subtype of A)

Return Value

Type: RetT

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT. 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).

ArgumentNullException if A is null
ArgumentException if axis points to a virtual dimension; or if repeats is negative.

This function repeats elements of A along a single dimension. By default, where no axis is defined A is reshaped to a vector in row-major order and all elements are repeated according to repeats. Otherwise, if an axis was specified, repetitions are performed along that dimension only. In this case, the array returned has the same shape as A, except that the working dimension axis is modified.

The value of repeats gives the counts for each element along the axis axis. This value must be a positive integer.

This function returns a new array and does not alter A or any input parameters.

[ILNumerics numpy Module]

See Also