ILNumerics Ultimate VSExtensionMethodsrepeatT1, 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.3.0.0 (5.3.7131.2749)
Syntax

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>

Parameters

A
Type: ILNumerics.Core.ArraysConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT
The array storing the elements to be repeated.
repeats
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

T1
Element type of A.
LocalT
(subtype of A)
InT
(subtype of A)
OutT
(subtype of A)
RetT
(subtype of A)
StorageT
(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).
Exceptions

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

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

Reference