Array

class ivy.array.array.Array(data)[source]

Bases: ArrayWithActivations, ArrayWithCreation, ArrayWithDataTypes, ArrayWithDevice, ArrayWithElementwise, ArrayWithGeneral, ArrayWithGradients, ArrayWithImage, ArrayWithLayers, ArrayWithLinearAlgebra, ArrayWithLosses, ArrayWithManipulation, ArrayWithNorms, ArrayWithRandom, ArrayWithSearching, ArrayWithSet, ArrayWithSorting, ArrayWithStatistical, ArrayWithUtility

property T
__add__(other)[source]

ivy.Array special method variant of ivy.add. This method simply wraps the function, and so the docstring for ivy.add also applies to this method with minimal changes.

Parameters
  • self – first input array. Should have a numeric data type.

Returns

ret – an array containing the element-wise sums. The returned array must have a data type determined by type-promotion.

Examples

With ivy.Array instances only:

>>> x = ivy.array([1, 2, 3])
>>> y = ivy.array([4, 5, 6])
>>> z = x + y
>>> print(z)
ivy.array([5, 7, 9])

With mix of ivy.Array and ivy.Container instances:

>>> x = ivy.array([[1.1, 2.3, -3.6]])
>>> y = ivy.Container(a=ivy.array([[4.], [5.], [6.]]),                            b=ivy.array([[5.], [6.], [7.]]))
>>> z = x + y
>>> print(z)
{
    a: ivy.array([[5.1, 6.3, 0.4],
                  [6.1, 7.3, 1.4],
                  [7.1, 8.3, 2.4]]),
    b: ivy.array([[6.1, 7.3, 1.4],
                  [7.1, 8.3, 2.4],
                  [8.1, 9.3, 3.4]])
}
__init__(data)[source]
__le__(other)[source]

Less than or equal to

Returns

  • an array containing the element-wise results. The returned array must have a

  • data type of bool.

Operator Examples

With ivy.Array instances:

>>> x = ivy.array([6, 2, 3])
>>> y = ivy.array([4, 5, 6])
>>> z = x <= y
>>> print(z)
ivy.array([ False, True, True])

With ivy.Container instances:

>>> x = ivy.Container(a=ivy.array([4, 5, 6]),                      b=ivy.array([2, 3, 4]))
>>> y = ivy.Container(a=ivy.array([1, 2, 3]),                          b=ivy.array([5, 6, 7]))
>>> z = x <= y
>>> print(z)
{
    a: ivy.array([False, False, False]),
    b: ivy.array([True, True, True])
}

With mix of ivy.Array and ivy.Container instances:

>>> x = ivy.array([[5.1, 2.3, -3.6]])
>>> y = ivy.Container(a=ivy.array([[4.], [5.], [6.]]),                              b=ivy.array([[5.], [6.], [7.]]))
>>> z = x <= y
>>> print(z)
{
    a: ivy.array([[False, True, True],
                  [False, True, True],
                  [True, True, True]]),
    b: ivy.array([[False, True, True],
                  [True, True, True],
                  [True, True, True]])
}
__radd__(other)[source]

ivy.Array reverse special method variant of ivy.add. This method simply wraps the function, and so the docstring for ivy.add also applies to this method with minimal changes.

Parameters
  • self – first input array. Should have a numeric data type.

Returns

ret – an array containing the element-wise sums. The returned array must have a data type determined by type-promotion.

Examples

>>> x = 1
>>> y = ivy.array([4, 5, 6])
>>> z = x + y
>>> print(z)
ivy.array([5, 6, 7])
adam_update(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

arange(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

arg_info(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

arg_names(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

args_to_ivy(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

args_to_native(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

array(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

array_equal(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

arrays_equal(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

as_ivy_dev(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

as_ivy_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

as_native_dev(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

as_native_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

assert_supports_inplace(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

cache_fn(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

clear_mem_on_dev(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

closest_valid_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

container_types(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

conv1d_transpose(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

conv2d(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

conv2d_transpose(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

conv3d(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

conv3d_transpose(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

copy_array(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

cumprod(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

cumsum(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

current_backend(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

current_backend_str(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

property data
deconv_length(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

default(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

default_device(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

default_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

default_float_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

default_int_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

default_uint_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

dev_util(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

property device
dropout(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

property dtype
dtype_bits(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

empty(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

execute_with_gradients(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

exists(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

eye(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

floormod(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

fourier_encode(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

full(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

function_supported_devices(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

function_supported_devices_and_dtypes(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

function_supported_dtypes(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

function_unsupported_devices(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

function_unsupported_devices_and_dtypes(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

function_unsupported_dtypes(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

get_all_arrays_in_memory(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

get_all_ivy_arrays_on_dev(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

get_array_mode(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

get_min_base(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

get_min_denominator(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

get_nestable_mode(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

get_num_dims(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

get_referrers_recursive(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

gpu_is_available(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

grad(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

handle_nestable(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

handle_out_argument(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

handle_padding(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

indices_where(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

infer_device(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

infer_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

inplace_arrays_supported(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

inplace_decrement(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

inplace_increment(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

inplace_update(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

inplace_variables_supported(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

inputs_to_native_arrays(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

invalid_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

is_array(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

is_ivy_array(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

is_ivy_container(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

is_native_array(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

property is_variable

Determines whether the array is a variable or not.

Returns

ret – Boolean, true if the array is a trainable variable, false otherwise.

jac(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

lamb_update(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

lars_update(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

linear(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

linspace(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

logspace(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

lstm_update(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

property mT
match_kwargs(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

matrix_power(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

maximum(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

minimum(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

multi_head_attention(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

multiprocessing(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

property ndim

Number of array dimensions (axes).

Returns

ret – number of array dimensions (axes).

normalize_axis_tuple(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

num_arrays_in_memory(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

num_cpu_cores(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

num_gpus(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

num_ivy_arrays_on_dev(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

one_hot(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

ones(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

optimizer_update(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

outputs_to_ivy_arrays(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

percent_used_mem_on_dev(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

print_all_arrays_in_memory(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

print_all_ivy_arrays_on_dev(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

promote_types(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

promote_types_of_inputs(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

queue_timeout(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

scaled_dot_product_attention(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

scatter_flat(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

scatter_nd(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

seed(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

set_array_mode(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

set_default_device(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

set_default_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

set_default_float_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

set_default_int_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

set_default_uint_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

set_min_base(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

set_min_denominator(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

set_nestable_mode(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

set_queue_timeout(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

set_shape_array_mode(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

set_split_factor(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

set_tmp_dir(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

set_with_grads(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

property shape
shape_array_mode(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

property size

Number of elements in an array.

Note

This must equal the product of the array’s dimensions.

Returns

out – number of elements in an array. The returned value must be None if and only if one or more array dimensions are unknown.

Note

For array libraries having graph-based computational models, an array may have unknown dimensions due to data-dependent operations.

slogdet(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

split_factor(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

split_func_call(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

stable_pow(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

supports_inplace(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

tmp_dir(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

to_ivy(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

to_ivy_shape(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

to_native(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

to_native_arrays_and_back(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

to_native_shape(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

to_scalar(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

total_mem_on_dev(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

tpu_is_available(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

try_else_none(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

type_promote_arrays(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

unset_array_mode(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

unset_default_device(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

unset_default_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

unset_default_float_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

unset_default_int_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

unset_default_uint_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

unset_nestable_mode(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

unset_shape_array_mode(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

unset_with_grads(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

used_mem_on_dev(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

valid_dtype(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

value_and_grad(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

value_is_nan(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

variable_data(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

with_grads(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

zeros(*args, **kwargs)

Add the data of the current array from which the instance function is invoked as the first arg parameter or kwarg parameter. Return the new function with the name function_name and the new args variable or kwargs as the new inputs.

class ivy.array.array.Variable(data)[source]

Bases: Array

__init__(data)[source]