Up to date

This page is up to date for NumDot stable. If you still find outdated information, please open an issue.

NDArray

Inherits: RefCounted

A NumDot tensor object.

Description

A NumDot tensor object.

Properties

int

buffer_dtype

int

buffer_size

int

buffer_size_in_bytes

DType

dtype

int

ndim

PackedInt64Array

shape

int

size

PackedInt64Array

strides

Layout

strides_layout

int

strides_offset

Methods

NDArray

as_type(type: DType) const

NDArray

assign_abs(a: Variant)

NDArray

assign_acos(a: Variant)

NDArray

assign_acosh(a: Variant)

NDArray

assign_add(a: Variant, b: Variant)

NDArray

assign_all(a: Variant, axes: Variant = null)

NDArray

assign_angle(a: Variant)

NDArray

assign_any(a: Variant, axes: Variant = null)

NDArray

assign_asin(a: Variant)

NDArray

assign_asinh(a: Variant)

NDArray

assign_atan(a: Variant)

NDArray

assign_atan2(x1: Variant, x2: Variant)

NDArray

assign_atanh(a: Variant)

NDArray

assign_bitwise_and(a: Variant, b: Variant)

NDArray

assign_bitwise_left_shift(a: Variant, b: Variant)

NDArray

assign_bitwise_not(a: Variant)

NDArray

assign_bitwise_or(a: Variant, b: Variant)

NDArray

assign_bitwise_right_shift(a: Variant, b: Variant)

NDArray

assign_bitwise_xor(a: Variant, b: Variant)

NDArray

assign_ceil(a: Variant)

NDArray

assign_clip(a: Variant, min: Variant, max: Variant)

NDArray

assign_conjugate(a: Variant)

NDArray

assign_convolve(array: Variant, kernel: Variant)

NDArray

assign_cos(a: Variant)

NDArray

assign_cosh(a: Variant)

NDArray

assign_cross(a: Variant, b: Variant, axisa: int = -1, axisb: int = -1, axisc: int = -1)

NDArray

assign_deg2rad(a: Variant)

NDArray

assign_divide(a: Variant, b: Variant)

NDArray

assign_dot(a: Variant, b: Variant)

NDArray

assign_equal(a: Variant, b: Variant)

NDArray

assign_exp(a: Variant)

NDArray

assign_floor(a: Variant)

NDArray

assign_greater(a: Variant, b: Variant)

NDArray

assign_greater_equal(a: Variant, b: Variant)

NDArray

assign_less(a: Variant, b: Variant)

NDArray

assign_less_equal(a: Variant, b: Variant)

NDArray

assign_log(a: Variant)

NDArray

assign_logical_and(a: Variant, b: Variant)

NDArray

assign_logical_not(a: Variant)

NDArray

assign_logical_or(a: Variant, b: Variant)

NDArray

assign_logical_xor(a: Variant, b: Variant)

NDArray

assign_matmul(a: Variant, b: Variant)

NDArray

assign_max(a: Variant, axes: Variant = null)

NDArray

assign_maximum(a: Variant, b: Variant)

NDArray

assign_mean(a: Variant, axes: Variant = null)

NDArray

assign_min(a: Variant, axes: Variant = null)

NDArray

assign_minimum(a: Variant, b: Variant)

NDArray

assign_multiply(a: Variant, b: Variant)

NDArray

assign_negative(a: Variant)

NDArray

assign_norm(a: Variant, ord: Variant = 2, axes: Variant = null)

NDArray

assign_not_equal(a: Variant, b: Variant)

NDArray

assign_positive(a: Variant)

NDArray

assign_pow(a: Variant, b: Variant)

NDArray

assign_prod(a: Variant, axes: Variant = null)

NDArray

assign_rad2deg(a: Variant)

NDArray

assign_reduce_dot(a: Variant, b: Variant, axes: Variant = null)

NDArray

assign_remainder(a: Variant, b: Variant)

NDArray

assign_rint(a: Variant)

NDArray

assign_round(a: Variant)

NDArray

assign_sign(a: Variant)

NDArray

assign_sin(a: Variant)

NDArray

assign_sinh(a: Variant)

NDArray

assign_sqrt(a: Variant)

NDArray

assign_square(a: Variant)

NDArray

assign_std(a: Variant, axes: Variant = null)

NDArray

assign_subtract(a: Variant, b: Variant)

NDArray

assign_sum(a: Variant, axes: Variant = null)

NDArray

assign_tan(a: Variant)

NDArray

assign_tanh(a: Variant)

NDArray

assign_trunc(a: Variant)

NDArray

assign_var(a: Variant, axes: Variant = null)

NDArray

copy() const

NDArray

flatten() const

NDArray

get(...) const vararg

Basis

get_basis(...) const vararg

bool

get_bool(...) const vararg

Color

get_color(...) const vararg

float

get_float(...) const vararg

int

get_int(...) const vararg

Plane

get_plane(...) const vararg

Projection

get_projection(...) const vararg

Quaternion

get_quaternion(...) const vararg

Vector2

get_vector2(...) const vararg

Vector2i

get_vector2i(...) const vararg

Vector3

get_vector3(...) const vararg

Vector3i

get_vector3i(...) const vararg

Vector4

get_vector4(...) const vararg

Vector4i

get_vector4i(...) const vararg

void

set(value: Variant, ...) const vararg

NDArray

squeeze() const

Basis

to_basis() const

bool

to_bool() const

Color

to_color() const

float

to_float() const

Array[NDArray]

to_godot_array() const

int

to_int() const

PackedByteArray

to_packed_byte_array() const

PackedColorArray

to_packed_color_array() const

PackedFloat32Array

to_packed_float32_array() const

PackedFloat64Array

to_packed_float64_array() const

PackedInt32Array

to_packed_int32_array() const

PackedInt64Array

to_packed_int64_array() const

PackedVector2Array

to_packed_vector2_array() const

PackedVector3Array

to_packed_vector3_array() const

PackedVector4Array

to_packed_vector4_array() const

Plane

to_plane() const

Projection

to_projection() const

Quaternion

to_quaternion() const

Vector2

to_vector2() const

Vector2i

to_vector2i() const

Vector3

to_vector3() const

Vector3i

to_vector3i() const

Vector4

to_vector4() const

Vector4i

to_vector4i() const

NDArray

transpose(...) const vararg


Enumerations

enum Layout: 🔗

Layout RowMajor = 0

The array's strides increase consistently from the inner to the outer dimensions.

Layout ColumnMajor = 1

The array's strides increase consistently from the outer to the inner dimensions.

Layout Dynamic = 2

The array's strides are inconsistent in order.

Layout Any = 3

Compatible with both row major and column major, i.e. 0D and 1D arrays.


Property Descriptions

int buffer_dtype 🔗

  • int get_buffer_dtype()

There is currently no description for this property. Please help us by contributing one!


int buffer_size 🔗

  • int get_buffer_size()

There is currently no description for this property. Please help us by contributing one!


int buffer_size_in_bytes 🔗

  • int get_buffer_size_in_bytes()

There is currently no description for this property. Please help us by contributing one!


DType dtype 🔗

There is currently no description for this property. Please help us by contributing one!


int ndim 🔗

  • int get_ndim()

There is currently no description for this property. Please help us by contributing one!


PackedInt64Array shape 🔗

  • PackedInt64Array get_shape()

There is currently no description for this property. Please help us by contributing one!

Note: The returned array is copied and any changes to it will not update the original property value. See PackedInt64Array for more details.


int size 🔗

  • int get_size()

There is currently no description for this property. Please help us by contributing one!


PackedInt64Array strides 🔗

  • PackedInt64Array get_strides()

There is currently no description for this property. Please help us by contributing one!

Note: The returned array is copied and any changes to it will not update the original property value. See PackedInt64Array for more details.


Layout strides_layout 🔗

There is currently no description for this property. Please help us by contributing one!


int strides_offset 🔗

  • int get_strides_offset()

There is currently no description for this property. Please help us by contributing one!


Method Descriptions

NDArray as_type(type: DType) const 🔗

Convert to an array of the given type, but avoid copying data if possible.


NDArray assign_abs(a: Variant) 🔗

In-place version of nd.abs().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_acos(a: Variant) 🔗

In-place version of nd.acos().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_acosh(a: Variant) 🔗

In-place version of nd.acosh().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_add(a: Variant, b: Variant) 🔗

In-place version of nd.add().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_all(a: Variant, axes: Variant = null) 🔗

In-place version of nd.all().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_angle(a: Variant) 🔗

In-place version of nd.angle().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_any(a: Variant, axes: Variant = null) 🔗

In-place version of nd.any().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_asin(a: Variant) 🔗

In-place version of nd.asin().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_asinh(a: Variant) 🔗

In-place version of nd.asinh().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_atan(a: Variant) 🔗

In-place version of nd.atan().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_atan2(x1: Variant, x2: Variant) 🔗

In-place version of nd.atan2().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_atanh(a: Variant) 🔗

In-place version of nd.atanh().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_bitwise_and(a: Variant, b: Variant) 🔗

In-place version of nd.bitwise_and().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_bitwise_left_shift(a: Variant, b: Variant) 🔗

In-place version of nd.bitwise_left_shift().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_bitwise_not(a: Variant) 🔗

In-place version of nd.bitwise_not().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_bitwise_or(a: Variant, b: Variant) 🔗

In-place version of nd.bitwise_or().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_bitwise_right_shift(a: Variant, b: Variant) 🔗

In-place version of nd.bitwise_right_shift().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_bitwise_xor(a: Variant, b: Variant) 🔗

In-place version of nd.bitwise_xor().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_ceil(a: Variant) 🔗

In-place version of nd.ceil().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_clip(a: Variant, min: Variant, max: Variant) 🔗

In-place version of nd.clip().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_conjugate(a: Variant) 🔗

In-place version of nd.conjugate().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_convolve(array: Variant, kernel: Variant) 🔗

In-place version of nd.convolve().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_cos(a: Variant) 🔗

In-place version of nd.cos().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_cosh(a: Variant) 🔗

In-place version of nd.cosh().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_cross(a: Variant, b: Variant, axisa: int = -1, axisb: int = -1, axisc: int = -1) 🔗

In-place version of nd.cross().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_deg2rad(a: Variant) 🔗

In-place version of nd.deg2rad().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_divide(a: Variant, b: Variant) 🔗

In-place version of nd.divide().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_dot(a: Variant, b: Variant) 🔗

In-place version of nd.dot().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_equal(a: Variant, b: Variant) 🔗

In-place version of nd.equal().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_exp(a: Variant) 🔗

In-place version of nd.exp().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_floor(a: Variant) 🔗

In-place version of nd.floor().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_greater(a: Variant, b: Variant) 🔗

In-place version of nd.greater().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_greater_equal(a: Variant, b: Variant) 🔗

In-place version of nd.greater_equal().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_less(a: Variant, b: Variant) 🔗

In-place version of nd.less().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_less_equal(a: Variant, b: Variant) 🔗

In-place version of nd.less_equal().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_log(a: Variant) 🔗

In-place version of nd.log().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_logical_and(a: Variant, b: Variant) 🔗

In-place version of nd.logical_and().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_logical_not(a: Variant) 🔗

In-place version of nd.logical_not().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_logical_or(a: Variant, b: Variant) 🔗

In-place version of nd.logical_or().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_logical_xor(a: Variant, b: Variant) 🔗

In-place version of nd.logical_xor().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_matmul(a: Variant, b: Variant) 🔗

In-place version of nd.matmul().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_max(a: Variant, axes: Variant = null) 🔗

In-place version of nd.max().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_maximum(a: Variant, b: Variant) 🔗

In-place version of nd.maximum().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_mean(a: Variant, axes: Variant = null) 🔗

In-place version of nd.mean().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_min(a: Variant, axes: Variant = null) 🔗

In-place version of nd.min().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_minimum(a: Variant, b: Variant) 🔗

In-place version of nd.minimum().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_multiply(a: Variant, b: Variant) 🔗

In-place version of nd.multiply().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_negative(a: Variant) 🔗

In-place version of nd.negative().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_norm(a: Variant, ord: Variant = 2, axes: Variant = null) 🔗

In-place version of nd.norm().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_not_equal(a: Variant, b: Variant) 🔗

In-place version of nd.not_equal().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_positive(a: Variant) 🔗

In-place version of nd.positive().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_pow(a: Variant, b: Variant) 🔗

In-place version of nd.pow().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_prod(a: Variant, axes: Variant = null) 🔗

In-place version of nd.prod().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_rad2deg(a: Variant) 🔗

In-place version of nd.rad2deg().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_reduce_dot(a: Variant, b: Variant, axes: Variant = null) 🔗

In-place version of nd.sum_product().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_remainder(a: Variant, b: Variant) 🔗

In-place version of nd.remainder().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_rint(a: Variant) 🔗

In-place version of nd.rint().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_round(a: Variant) 🔗

In-place version of nd.round().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_sign(a: Variant) 🔗

In-place version of nd.sign().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_sin(a: Variant) 🔗

In-place version of nd.sin().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_sinh(a: Variant) 🔗

In-place version of nd.sinh().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_sqrt(a: Variant) 🔗

In-place version of nd.sqrt().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_square(a: Variant) 🔗

In-place version of nd.square().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_std(a: Variant, axes: Variant = null) 🔗

In-place version of nd.std().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_subtract(a: Variant, b: Variant) 🔗

In-place version of nd.subtract().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_sum(a: Variant, axes: Variant = null) 🔗

In-place version of nd.sum().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_tan(a: Variant) 🔗

In-place version of nd.tan().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_tanh(a: Variant) 🔗

In-place version of nd.tanh().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_trunc(a: Variant) 🔗

In-place version of nd.trunc().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray assign_var(a: Variant, axes: Variant = null) 🔗

In-place version of nd.var().

Assigns the result to this array, and returns it. The shape of the result must be broadcastable to this array's shape.


NDArray copy() const 🔗

Creates a copy of this array.


NDArray flatten() const 🔗

Return a copy of the array collapsed into one dimension.


NDArray get(...) const vararg 🔗

Indexes into the array, and return the resulting tensor.

If the index is a single boolean array, it is treated as a mask.

If the index is a single integer array, it is treated as an index list.


Basis get_basis(...) const vararg 🔗

Indexes into the array, and return the resulting tensor as a Basis, if the shape is compatible.

See get() for documentation of slicing.


bool get_bool(...) const vararg 🔗

Indexes into the array, and return the resulting value as bool.

Errors if the index does not yield a single value.


Color get_color(...) const vararg 🔗

Indexes into the array, and return the resulting tensor as a Color, if the shape is compatible.

See get() for documentation of slicing.


float get_float(...) const vararg 🔗

Indexes into the array, and return the resulting value as float.

Errors if the index does not yield a single value.


int get_int(...) const vararg 🔗

Indexes into the array, and return the resulting value as int.

Errors if the index does not yield a single value.


Plane get_plane(...) const vararg 🔗

Indexes into the array, and return the resulting tensor as a Plane, if the shape is compatible.

See get() for documentation of slicing.


Projection get_projection(...) const vararg 🔗

Indexes into the array, and return the resulting tensor as a Projection, if the shape is compatible.

See get() for documentation of slicing.


Quaternion get_quaternion(...) const vararg 🔗

Indexes into the array, and return the resulting tensor as a Quaternion, if the shape is compatible.

See get() for documentation of slicing.


Vector2 get_vector2(...) const vararg 🔗

Indexes into the array, and return the resulting tensor as a Vector2, if the shape is compatible.

See get() for documentation of slicing.


Vector2i get_vector2i(...) const vararg 🔗

Indexes into the array, and return the resulting tensor as a Vector2i, if the shape is compatible.

See get() for documentation of slicing.


Vector3 get_vector3(...) const vararg 🔗

Indexes into the array, and return the resulting tensor as a Vector3, if the shape is compatible.

See get() for documentation of slicing.


Vector3i get_vector3i(...) const vararg 🔗

Indexes into the array, and return the resulting tensor as a Vector3i, if the shape is compatible.

See get() for documentation of slicing.


Vector4 get_vector4(...) const vararg 🔗

Indexes into the array, and return the resulting tensor as a Vector4, if the shape is compatible.

See get() for documentation of slicing.


Vector4i get_vector4i(...) const vararg 🔗

Indexes into the array, and return the resulting tensor as a Vector4i, if the shape is compatible.

See get() for documentation of slicing.


void set(value: Variant, ...) const vararg 🔗

Indexes into the array, sets the element to the given value.

The first value is the value to be set, all following values are indexes into the array.

If the index is a single boolean array, it is treated as a mask.

If the index is a single integer array, it is treated as an index list.


NDArray squeeze() const 🔗

Remove axes of length one from a copy of this array.


Basis to_basis() const 🔗

If shape is [3, 3], converts this tensor to a Basis.


bool to_bool() const 🔗

Convert this tensor to a single bool.

Errors if size() is not 1.


Color to_color() const 🔗

If shape is [4], converts this tensor to a Color.


float to_float() const 🔗

Convert this tensor to a single float.

Errors if size() is not 1.


Array[NDArray] to_godot_array() const 🔗

Convert this tensor to a Godot array. For now, the resulting array is flat.


int to_int() const 🔗

Convert this tensor to a single int.

Errors if size() is not 1.


PackedByteArray to_packed_byte_array() const 🔗

If 1D, converts this tensor to a PackedByteArray.

If the backing array is PackedByteArray, it will produce an instantaneous copy-on-write copy.


PackedColorArray to_packed_color_array() const 🔗

If shape is [?, 4], converts this tensor to a PackedColorArray.

If the backing array is PackedColorArray, it will produce an instantaneous copy-on-write copy.


PackedFloat32Array to_packed_float32_array() const 🔗

If 1D, converts this tensor to a PackedFloat32Array.

If the backing array is PackedFloat32Array, it will produce an instantaneous copy-on-write copy.


PackedFloat64Array to_packed_float64_array() const 🔗

If 1D, converts this tensor to a PackedFloat64Array.

If the backing array is PackedFloat64Array, it will produce an instantaneous copy-on-write copy.


PackedInt32Array to_packed_int32_array() const 🔗

If 1D, converts this tensor to a PackedInt32Array.

If the backing array is PackedInt32Array, it will produce an instantaneous copy-on-write copy.


PackedInt64Array to_packed_int64_array() const 🔗

If 1D, converts this tensor to a PackedInt64Array.

If the backing array is PackedInt64Array, it will produce an instantaneous copy-on-write copy.


PackedVector2Array to_packed_vector2_array() const 🔗

If shape is [?, 2], converts this tensor to a PackedVector2Array.

If the backing array is PackedVector2Array, it will produce an instantaneous copy-on-write copy.


PackedVector3Array to_packed_vector3_array() const 🔗

If shape is [?, 3], converts this tensor to a PackedVector3Array.

If the backing array is PackedVector3Array, it will produce an instantaneous copy-on-write copy.


PackedVector4Array to_packed_vector4_array() const 🔗

If shape is [?, 4], converts this tensor to a PackedVector4Array.

If the backing array is PackedVector4Array, it will produce an instantaneous copy-on-write copy.


Plane to_plane() const 🔗

If shape is [4], converts this tensor to a Plane.


Projection to_projection() const 🔗

If shape is [4, 4], converts this tensor to a Projection.


Quaternion to_quaternion() const 🔗

If shape is [4], converts this tensor to a Quaternion.


Vector2 to_vector2() const 🔗

If shape is [2], converts this tensor to a Vector2.


Vector2i to_vector2i() const 🔗

If shape is [2], converts this tensor to a Vector2i.


Vector3 to_vector3() const 🔗

If shape is [3], converts this tensor to a Vector3.


Vector3i to_vector3i() const 🔗

If shape is [3], converts this tensor to a Vector3i.


Vector4 to_vector4() const 🔗

If shape is [4], converts this tensor to a Vector4.


Vector4i to_vector4i() const 🔗

If shape is [4], converts this tensor to a Vector4.


NDArray transpose(...) const vararg 🔗

Returns a view of the array with axes transposed.

Refer to nd.transpose() for full documentation.

Axes can be passed without creating an array, e.g. array.transpose(3, 1, 2).


User-contributed notes

Please read the User-contributed notes policy before submitting a comment.