Class JuliaArray

Wrapper for Julia Array.

Hierarchy

  • JuliaArray

Implements

Constructors

Properties

ptr: number

Accessors

  • get ndims(): number
  • Number of dimensions of the array.

    Returns number

  • get rawPtr(): number
  • Get the raw pointer of the array.

    Returns number

  • get size(): number[]
  • Size (equivalent to shape in numpy's terms) of the array.

    Returns number[]

  • get value(): any[] | BunArray
  • Returns any[] | BunArray

Methods

  • Fill the array with the given value.

    Parameters

    • value: any

      Value to be filled.

    Returns void

  • Get data at the given index.

    Returns

    Julia data at the given index, wrapped in a JuliaValue object.

    Parameters

    • index: number

      The index (starting from 0) to be fetched.

    Returns JuliaValue

  • Parameters

    • Rest ...values: any[]

    Returns number

  • Reshape the array with the given shape and get a new array.

    Note that the new array shares the underlying memory with the original array. So if you have reshaped an array, you cannot perform pop() or push() operations on it since this will affect the arrays that share data with the current array.

    Parameters

    • Rest ...shape: number[]

    Returns JuliaArray

  • Parameters

    • index: number
    • value: any

      Data to be set at the given index.

    Returns void

  • Create a JuliaArray from a BunArray (TypedArray | BigInt64Array | BigUint64Array).

    Parameters

    • arr: BunArray
    • extraOptions: Partial<FromBunArrayOptions> = {}

    Returns JuliaArray

Generated using TypeDoc