Tensor🔗

class Tensor(dimensions, bufferOrType, byteOffset)🔗

A tensor. Corresponds to the va_tensor C type.

Arguments
  • dimensions (NumericArray) –

  • bufferOrType (number|ArrayBuffer|Int8Array|Uint8Array|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array|DataView|BufferAndType) –

  • byteOffset (number) –

Tensor.data🔗

type: TypedArray

Tensor.dimensions🔗

type: Uint32Array

Tensor.info🔗

type: MdArrayInfo

Tensor.Type🔗

type: Readonly<AnyObject>

Tensor.elementCount()🔗

Returns the total number of elements in the array.

Returns

number

Tensor.entry(...indices)🔗
Arguments
  • indices (number[]|[TypedArray]) –

Returns

number

Tensor.equals(other)🔗
Arguments
  • other (any) –

Returns

boolean

Tensor.forEach(callback)🔗
Arguments
  • reflection> callback (<TODO:) –

Tensor.setEntry(...args)🔗
Arguments
  • args (number[]|[TypedArray]) –

Tensor.toIndex(indices)🔗

Flattens a multi-dimensional array index to one-dimensional index for array look-up.

Arguments
  • indices (NumericArray) –

Returns

number

Tensor.transform(callback)🔗
Arguments
  • reflection> callback (<TODO:) –

Tensor.write(stream)🔗
Arguments
  • stream (default) –

Tensor.read(stream)🔗
Arguments
  • stream (default) –

Returns

Tensor