RowStrides

class RowStrides(val shape: ShapeND) : Strides(source)

This Strides implementation follows the last dimension first convention For more information: https://numpy.org/doc/stable/reference/generated/numpy.ndarray.strides.html

Parameters

shape

the shape of the tensor.

Constructors

Link copied to clipboard
constructor(shape: ShapeND)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun asSequence(): Sequence<IntArray>

Iterate over ND indices in a natural order

Link copied to clipboard
fun <T, S : Group<T>, ScaleOperations<T>> Iterable<T>.averageWith(space: S): T

Returns an average value of elements in the iterable in this Group.

Link copied to clipboard
inline fun <T, R> Iterable<T>.cumulative(initial: R, crossinline operation: (R, T) -> R): Iterable<R>
Link copied to clipboard
@JvmName(name = "cumulativeSumOfDouble")
fun Iterable<Double>.cumulativeSum(): Iterable<Double>
@JvmName(name = "cumulativeSumOfInt")
fun Iterable<Int>.cumulativeSum(): Iterable<Int>
@JvmName(name = "cumulativeSumOfLong")
fun Iterable<Long>.cumulativeSum(): Iterable<Long>

Cumulative sum with custom space

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun index(offset: Int): IntArray

Get multidimensional from linear

Link copied to clipboard
open operator override fun iterator(): Iterator<IntArray>
Link copied to clipboard
open override fun offset(index: IntArray): Int

Get linear index from multidimensional index

Link copied to clipboard
fun <T> Iterable<T>.sumWith(group: Group<T>): T

Returns the sum of all elements in the iterable in provided space.

Link copied to clipboard
inline fun <T, R> Iterable<T>.sumWithGroupOf(group: Group<R>, extractor: (T) -> R): R

Sum extracted elements of Iterable with given group

Properties

Link copied to clipboard
open override val linearSize: Int

The size of linear buffer to accommodate all elements of ND-structure corresponding to strides

Link copied to clipboard
open override val shape: ShapeND