ILNumerics Ultimate VS

numpyrepeatT1, LocalT, InT, OutT, RetT, StorageT, IndT Method

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
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, IndT>(
	ConcreteArray<T1, LocalT, InT, OutT, RetT, StorageT> A,
	BaseArray<IndT> 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>
where IndT : struct, new(), IConvertible


Type: ILNumerics.Core.ArraysConcreteArrayT1, LocalT, InT, OutT, RetT, StorageT
The array storing the elements to be repeated.
Type: ILNumericsBaseArrayIndT
Counts for element repetitions.
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)
Element type of repeats. Must be an integer type.

Return Value

Type: RetT

ArgumentNullException if any of the A or repeats is null
ArgumentException if axis points to a virtual dimension; if repeats is not a numeric array, is of a shape which is not broadcastable to the length of the working dimension or contains elements which are not convertible to positive integer values;

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

The shape of repeats is ignored. Its values give the counts for each element along the axis axis. Values must be numeric, positive integers and are read in row-major order. If repeats has exactly one element all elements along the working dimension of A are repeated by the same number. Alternatively, the length of repeats must match A.S[axis] to specify individual repetition counts for each element along the working dimension. Thus, if axis is null (default) repeats can be a scalar or an array with 'A.S.NumberOfElements == repeats.S.NumberOfElements'.

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

[ILNumerics numpy Module]

See Also