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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Methods
assign_abs(a: |
|
assign_acos(a: |
|
assign_acosh(a: |
|
assign_add(a: |
|
assign_all(a: |
|
assign_angle(a: |
|
assign_any(a: |
|
assign_asin(a: |
|
assign_asinh(a: |
|
assign_atan(a: |
|
assign_atan2(x1: |
|
assign_atanh(a: |
|
assign_bitwise_and(a: |
|
assign_bitwise_left_shift(a: |
|
assign_bitwise_not(a: |
|
assign_bitwise_or(a: |
|
assign_bitwise_right_shift(a: |
|
assign_bitwise_xor(a: |
|
assign_ceil(a: |
|
assign_clip(a: |
|
assign_conjugate(a: |
|
assign_convolve(array: |
|
assign_cos(a: |
|
assign_cosh(a: |
|
assign_cross(a: |
|
assign_deg2rad(a: |
|
assign_divide(a: |
|
assign_dot(a: |
|
assign_equal(a: |
|
assign_exp(a: |
|
assign_floor(a: |
|
assign_greater(a: |
|
assign_greater_equal(a: |
|
assign_less(a: |
|
assign_less_equal(a: |
|
assign_log(a: |
|
assign_logical_and(a: |
|
assign_logical_not(a: |
|
assign_logical_or(a: |
|
assign_logical_xor(a: |
|
assign_matmul(a: |
|
assign_max(a: |
|
assign_maximum(a: |
|
assign_mean(a: |
|
assign_min(a: |
|
assign_minimum(a: |
|
assign_multiply(a: |
|
assign_negative(a: |
|
assign_norm(a: |
|
assign_not_equal(a: |
|
assign_positive(a: |
|
assign_pow(a: |
|
assign_prod(a: |
|
assign_rad2deg(a: |
|
assign_reduce_dot(a: |
|
assign_remainder(a: |
|
assign_rint(a: |
|
assign_round(a: |
|
assign_sign(a: |
|
assign_sin(a: |
|
assign_sinh(a: |
|
assign_sqrt(a: |
|
assign_square(a: |
|
assign_std(a: |
|
assign_subtract(a: |
|
assign_sum(a: |
|
assign_tan(a: |
|
assign_tanh(a: |
|
assign_trunc(a: |
|
assign_var(a: |
|
copy() const |
|
flatten() const |
|
get(...) const vararg |
|
|
get_basis(...) const vararg |
|
get_bool(...) const vararg |
|
get_color(...) const vararg |
|
get_float(...) const vararg |
|
get_int(...) const vararg |
|
get_plane(...) const vararg |
|
get_projection(...) const vararg |
|
get_quaternion(...) const vararg |
|
get_vector2(...) const vararg |
|
get_vector2i(...) const vararg |
|
get_vector3(...) const vararg |
|
get_vector3i(...) const vararg |
|
get_vector4(...) const vararg |
|
get_vector4i(...) const vararg |
void |
set(value: |
squeeze() const |
|
|
to_basis() const |
|
to_bool() const |
|
to_color() const |
|
to_float() const |
Array[NDArray] |
to_godot_array() const |
|
to_int() const |
|
to_packed_byte_array() const |
|
to_packed_color_array() const |
|
to_packed_float32_array() const |
|
to_packed_float64_array() const |
|
to_packed_int32_array() const |
|
to_packed_int64_array() const |
|
to_packed_vector2_array() const |
|
to_packed_vector3_array() const |
|
to_packed_vector4_array() const |
|
to_plane() const |
|
to_projection() const |
|
to_quaternion() const |
|
to_vector2() const |
|
to_vector2i() const |
|
to_vector3() const |
|
to_vector3i() const |
|
to_vector4() const |
|
to_vector4i() const |
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 🔗
intget_buffer_dtype()
There is currently no description for this property. Please help us by contributing one!
int buffer_size 🔗
intget_buffer_size()
There is currently no description for this property. Please help us by contributing one!
int buffer_size_in_bytes 🔗
intget_buffer_size_in_bytes()
There is currently no description for this property. Please help us by contributing one!
DType get_dtype()
There is currently no description for this property. Please help us by contributing one!
int ndim 🔗
intget_ndim()
There is currently no description for this property. Please help us by contributing one!
PackedInt64Array shape 🔗
PackedInt64Arrayget_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 🔗
intget_size()
There is currently no description for this property. Please help us by contributing one!
PackedInt64Array strides 🔗
PackedInt64Arrayget_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 get_strides_layout()
There is currently no description for this property. Please help us by contributing one!
int strides_offset 🔗
intget_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.
Creates a copy of this array.
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.
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).