id int64 0 190k | prompt stringlengths 21 13.4M | docstring stringlengths 1 12k ⌀ |
|---|---|---|
148,589 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Round an array of floats element-wise to nearest integer towards zero. The rounded values are returned as floats. Parameters ---------- x Array input. out optional output array, for writing the result to. Returns ------- ret Array of floats with elements corresponding to input elements rounded to nearest integer toward... |
148,590 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Return the next floating-point value after x1 towards x2, element-wise. Parameters ---------- x1 First input array. x2 Second input array. out Alternate output array in which to place the result. The default is None. Returns ------- ret The next representable values of x1 in the direction of x2. Examples -------- >>> x... |
148,591 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Compute the Hurwitz zeta function elementwisely with each pair of floats in two arrays. Parameters ---------- x First input array. q Second input array, must have the same shape as the first input array out Alternate output array in which to place the result. The default is None. Returns ------- ret Array with values c... |
148,592 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Calculate gradient of x with respect to (w.r.t.) spacing. Parameters ---------- x input array representing outcomes of the function spacing if not given, indices of x will be used if scalar indices of x will be scaled with this value if array gradient of x w.r.t. spacing edge_order 1 or 2, for 'frist order' and 'second... |
148,593 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Compute x*log(y) element-wise so that the result is 0 if x = 0. Parameters ---------- x First input array. y Second input array. out Alternate output array in which to place the result. The default is None. Returns ------- ret The next representable values of x1 in the direction of x2. Examples -------- >>> x = ivy.zer... |
148,594 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Map the values of the input tensor to either 0 or 1, element-wise, based on the outcome of a comparison against a threshold value. Parameters ---------- x Data to be binarized threshold Values greater than this are mapped to 1, others to 0. out optional output array, for writing the result to. It must have a shape that... |
148,595 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Return the complex conjugate for each element ``x_i`` of the input array ``x``. For complex number of the form .. math:: a + bj the complex conjugate is defined as .. math:: a - bj Hence, the returned conjugates must be computed by negating the imaginary component of each element ``x_i`` This method conforms to the `Ar... |
148,596 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Return x1 * (2**x2), element-wise. Parameters ---------- x1 Input array. x2 Input array. out optional output array, for writing the result to. It must have a shape that the inputs broadcast to. Returns ------- ret The next representable values of x1 in the direction of x2. Examples -------- >>> x1 = ivy.array([1, 2, 3]... |
148,597 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Return a linear interpolation of two arrays start (given by input) and end. based on a scalar or array weight. input + weight * (end - input), element-wise. Parameters ---------- input array of starting points end array of ending points weight the weight for the interpolation formula. Scalar or Array. out optional outp... |
148,598 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Decompose the elements of x into mantissa and twos exponent. Parameters ---------- x Input array. out optional output array, for writing the result to. It must have a shape that the inputs broadcast to. Returns ------- ret A tuple of two arrays, the mantissa and the twos exponent. Examples -------- >>> x = ivy.array([1... |
148,599 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Decompose the elements of x into fractional and integral parts. Parameters ---------- x Input array. out Optional output array for writing the result to. It must have a shape that the inputs broadcast to. Returns ------- ret A tuple of two arrays, the fractional and integral parts. Examples -------- >>> x = ivy.array([... |
148,600 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Compute the logarithmic derivative of the gamma function at x. Note ---- The Ivy version only accepts real-valued inputs. Parameters ---------- x Input array. out Alternate output array in which to place the result. The default is None. Returns ------- ret Array with values computed from digamma function from input arr... |
148,601 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Zeros out all elements in the tensor except `card` elements with maximum absolute values. Parameters ---------- x Tensor to be sparsified card Desired number of non-zero elements in the tensor out Optional output array for writing the result to. Returns ------- ivy.array of shape tensor.shape Examples -------- >>> x = ... |
148,602 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Complementary error function, 1 - erf(x) Parameters ---------- x Input array of real or complex valued argument. out optional output array, for writing the result to. It must have a shape that the inputs broadcast to. Returns ------- ret Values of the complementary error function. Examples -------- >>> x = ivy.array([2... |
148,603 | from typing import Optional, Union, Tuple, List, Sequence
from numbers import Number
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
handle_nestable,
handle_partial_mixed_function,
handle_array_like_without_promotion,
inputs_to_ivy_arrays,
handle_arr... | Compute the inverse error function. Parameters ---------- x Input array of real or complex valued argument. out optional output array, for writing the result to. It must have a shape that the inputs broadcast to. Returns ------- ret Values of the inverse error function. Examples -------- >>> x = ivy.array([0, 0.5, -1.]... |
148,604 | from typing import Optional, Union, Sequence
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
inputs_to_native_shapes,
handle_nestable,
infer_dtype,
handle_device,
handle_backend_invalid,
)
from ivy.utils.exceptions import handle_exceptions
The provi... | Draw size samples of dimension k from a Dirichlet distribution. A Dirichlet- distributed random variable can be seen as a multivariate generalization of a Beta distribution. The Dirichlet distribution is a conjugate prior of a multinomial distribution in Bayesian inference. Parameters ---------- alpha Sequence of float... |
148,605 | from typing import Optional, Union, Sequence
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
inputs_to_native_shapes,
handle_nestable,
infer_dtype,
handle_device,
handle_backend_invalid,
)
from ivy.utils.exceptions import handle_exceptions
The provi... | Return an array filled with random values sampled from a beta distribution. Parameters ---------- a Alpha parameter of the beta distribution. b Beta parameter of the beta distribution. shape If the given shape is, e.g ``(m, n, k)``, then ``m * n * k`` samples are drawn Can only be specified when ``mean`` and ``std`` ar... |
148,606 | from typing import Optional, Union, Sequence
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
inputs_to_native_shapes,
handle_nestable,
infer_dtype,
handle_device,
handle_backend_invalid,
)
from ivy.utils.exceptions import handle_exceptions
The provi... | Return an array filled with random values sampled from a gamma distribution. Parameters ---------- alpha Alpha parameter of the gamma distribution. beta Beta parameter of the gamma distribution. shape Shape parameter of the gamma distribution. device device on which to create the array. 'cuda:0', 'cuda:1', 'cpu' etc. (... |
148,607 | from typing import Optional, Union, Sequence
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
inputs_to_native_shapes,
handle_nestable,
infer_dtype,
handle_device,
handle_backend_invalid,
)
from ivy.utils.exceptions import handle_exceptions
The provi... | Draws samples from a poisson distribution. Parameters ---------- lam Rate parameter(s) describing the poisson distribution(s) to sample. It must have a shape that is broadcastable to the requested shape. shape If the given shape is, e.g '(m, n, k)', then 'm * n * k' samples are drawn. (Default value = 'None', where 'iv... |
148,608 | from typing import Optional, Union, Sequence
import ivy
from ivy.func_wrapper import (
handle_out_argument,
to_native_arrays_and_back,
inputs_to_native_shapes,
handle_nestable,
infer_dtype,
handle_device,
handle_backend_invalid,
)
from ivy.utils.exceptions import handle_exceptions
The provi... | Draws samples from Bernoulli distribution parameterized by probs or logits (but not both) Parameters ---------- logits An N-D Array representing the log-odds of a 1 event. Each entry in the Array parameterizes an independent Bernoulli distribution where the probability of an event is sigmoid (logits). Only one of logit... |
148,609 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Compute a 1-D max pool given 3-D input x. Parameters ---------- x Input image *[batch_size, w, d_in]* if data_format is "NWC". kernel Size of the kernel i.e., the sliding window for each dimension of input. *[w]*. strides The stride of the sliding window for each dimension of input. padding "SAME" or "VALID" indicating... |
148,610 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Compute a 3-D avg pool given 5-D input x. Parameters ---------- x Input volume *[batch_size,d,h,w,d_in]*. kernel Convolution filters *[d,h,w]*. strides The stride of the sliding window for each dimension of input. padding SAME" or "VALID" indicating the algorithm, or list indicating the per-dimension paddings. data_for... |
148,611 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Compute the 1D Inverse Discrete Cosine Transformation of a given signal. Parameters ---------- x The input signal. type The type of the idct. Must be 1, 2, 3 or 4. n The length of the transform. If n is less than the input signal length, then x is truncated, if n is larger then x is zero-padded. axis The axis to comput... |
148,612 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Randomly zero out entire channels with probability prob using samples from a Bernoulli distribution and the remaining channels are scaled by (1/1-prob). In this case, dropout1d performs a channel-wise dropout but assumes a channel is a 1D feature map. Parameters ---------- x a 2D or 3D input array. Should have a floati... |
148,613 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Randomly zero out entire channels with probability prob using samples from a Bernoulli distribution and the remaining channels are scaled by (1/1-prob). In this case, dropout2d performs a channel-wise dropout but assumes a channel is a 2D feature map. Parameters ---------- x a 3D or 4D input array. Should have a floati... |
148,614 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Randomly zero out entire channels with probability prob using samples from a Bernoulli distribution and the remaining channels are scaled by (1/1-prob). In this case, dropout3d performs a channel-wise dropout but assumes a channel is a 1D feature map. Parameters ---------- x a 4D or 5D input array. Should have a floati... |
148,615 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Embeds a given tensor of indices using a given tensor of weights. Parameters ---------- weights The weights tensor. indices The indices tensor. max_norm The maximum norm of the embeddings. out Optional output array, for writing the result to. It must have a shape that the inputs broadcast to. Returns ------- ret The re... |
148,616 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Compute the discrete Fourier transform of input. Parameters ---------- x Input volume *[...,d_in,...]*, where d_in indicates the dimension that needs FFT. axis The axis on which to perform the DFT. By default this value is set to 1, which corresponds to the first dimension after the batch index. inverse Whether to perf... |
148,617 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | null |
148,618 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Down/up samples the input to the given size. The algorithm used for interpolation is determined by mode. Parameters ---------- x Input array, Must have the shape [batch x channels x [optional depth] x [optional height] x width]. size Output size. mode Interpolation mode. Can be one of the following: - linear - bilinear... |
148,619 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Apply a 2D adaptive maximum pooling over an input signal composed of several input planes. Parameters ---------- input Input array. Must have shape (N, C, H_in, W_in) or (C, H_in, W_in) where N is the batch dimension, C is the feature dimension, and H_in and W_in are the 2 spatial dimensions. output_size Spatial output... |
148,620 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Apply a 3D adaptive maximum pooling over an input signal composed of several input planes. Parameters ---------- input Input array. Must have shape (N, C, D_in, H_in, W_in) or (C, D_in, H_in, W_in) where N is the batch dimension, C is the feature dimension, and D_in, H_in, and W_in are the 3 spatial dimensions. output_... |
148,621 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Apply a 1D adaptive average pooling over an input signal composed of several input planes. Parameters ---------- input Input array. Must have shape (N, C, L_in) or (C, L_in) where N is the batch dimension, C is the feature dimension, and L_in is the spatial dimension. output_size Spatial output size. Returns ------- Th... |
148,622 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Apply a 2D adaptive average pooling over an input signal composed of several input planes. Parameters ---------- input A 3D or 4D input array. Should have a floating-point data type. output_size Spatial output size. data_format "NHWC" or "NCHW". Defaults to "NHWC". Returns ------- The result of the pooling operation. W... |
148,623 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | null |
148,624 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | r"""Compute the 2-dimensional discrete Fourier Transform. Parameters ---------- x Input volume *[...,d_in,...]*, where d_in indicates the dimension that needs FFT2. s sequence of ints, optional Shape (length of each transformed axis) of the output (s[0] refers to axis 0, s[1] to axis 1, etc.). This corresponds to n for... |
148,625 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | r"""Compute the N-dimensional inverse discrete Fourier Transform. Parameters ---------- x Input array of complex numbers. s Shape (length of transformed axis) of the output (`s[0]` refers to axis 0, `s[1]` to axis 1, etc.). If given shape is smaller than that of the input, the input is cropped. If larger, input is padd... |
148,626 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Compute the N-dimensional discrete Fourier Transform for real input. Parameters ---------- x : array_like Input array, taken to be real. s : sequence of ints, optional Shape (length along each transformed axis) to use from the input. (s[0] refers to axis 0, s[1] to axis 1, etc.). The final element of s corresponds to n... |
148,627 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | ivy.Container static method variant of ivy.stft. This method simply wraps the function, and so the docstring for ivy.stft also applies to this method with minimal changes. Parameters ---------- signals Input Arrays. frame_length An integer scalar Tensor. The window length in samples. frame_step An integer scalar Tensor... |
148,628 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Compute a 1-D max unpooling given the 1-D pooled input x and its indices. Parameters ---------- input Pooled input image *[batch_size, w, d_in]*. indices Indices obtained from the corresponding max pooling operation. kernel_size Size of the kernel i.e., the sliding window for each dimension of input. *[w]*. strides The... |
148,629 | import math
import itertools
from typing import Optional, Union, Tuple, List, Literal, Sequence, Callable
from functools import reduce as _reduce
import builtins
import ivy
from ivy.func_wrapper import (
handle_array_like_without_promotion,
handle_out_argument,
to_native_arrays_and_back,
handle_nestable... | Iterate over the time dimension of a tensor. Parameters ---------- step_function RNN step function. inputs Array of temporal data of shape (samples, time, ...). initial_states Array with shape (samples, state_size). go_backwards If True, do the iteration over the time dimension in reverse order and return the reversed ... |
148,630 | from typing import Union, Callable, Any, Iterable, Dict
import ivy
from ivy.utils.backend import current_backend
from ivy.func_wrapper import (
handle_array_like_without_promotion,
to_native_arrays_and_back,
)
import ivy.utils.backend.handler
from ivy.utils import check_for_binaries
from ivy._version import __... | Take a condition function and two functions as input. If the condition is True, the first function is executed and its result is returned. Otherwise, the second function is executed and its result is returned. Parameters ---------- cond A function returning a boolean. body_fn A callable function to be executed if the c... |
148,631 | from typing import Union, Callable, Any, Iterable, Dict
import ivy
from ivy.utils.backend import current_backend
from ivy.func_wrapper import (
handle_array_like_without_promotion,
to_native_arrays_and_back,
)
def while_loop(
test_fn: Callable,
body_fn: Callable,
vars: Dict[str, Union[ivy.Array, ivy... | Loops over an iterable, passing the current iteration along with a tuple of variables into the provided body function. Parameters ---------- iterable The iterable to loop over. body_fn A function to call each iteration, first taking the iterator value and then a tuple of extra parameters. vars Extra parameters to be pa... |
148,632 | from typing import Union, Callable, Any, Iterable, Dict
import ivy
from ivy.utils.backend import current_backend
from ivy.func_wrapper import (
handle_array_like_without_promotion,
to_native_arrays_and_back,
)
import ivy.utils.backend.handler
from ivy.utils import check_for_binaries
from ivy._version import __... | null |
148,633 | from typing import Union, Callable, Any, Iterable, Dict
import ivy
from ivy.utils.backend import current_backend
from ivy.func_wrapper import (
handle_array_like_without_promotion,
to_native_arrays_and_back,
)
def cmp_is(left, right):
return left is right | null |
148,634 | from typing import Union, Callable, Any, Iterable, Dict
import ivy
from ivy.utils.backend import current_backend
from ivy.func_wrapper import (
handle_array_like_without_promotion,
to_native_arrays_and_back,
)
def cmp_isnot(left, right):
return left is not right | null |
148,635 | from typing import Union, Tuple, Optional
import ivy
from ivy.func_wrapper import (
handle_array_function,
to_native_arrays_and_back,
handle_out_argument,
handle_nestable,
handle_array_like_without_promotion,
handle_device,
handle_backend_invalid,
)
from ivy.utils.exceptions import handle_ex... | Return the unique elements of an input array ``x``, the first occurring indices for each unique element in ``x``, the indices from the set of unique elements that reconstruct ``x``, and the corresponding counts for each unique element in ``x``. .. admonition:: Data-dependent output shape :class: important The shapes of... |
148,636 | from typing import Union, Tuple, Optional
import ivy
from ivy.func_wrapper import (
handle_array_function,
to_native_arrays_and_back,
handle_out_argument,
handle_nestable,
handle_array_like_without_promotion,
handle_device,
handle_backend_invalid,
)
from ivy.utils.exceptions import handle_ex... | Return the unique elements of an input array ``x``, and the indices from the set of unique elements that reconstruct ``x``. .. admonition:: Data-dependent output shape :class: important The shapes of two of the output arrays for this function depend on the data values in the input array; hence, array libraries which bu... |
148,637 | from typing import Union, Tuple, Optional
import ivy
from ivy.func_wrapper import (
handle_array_function,
to_native_arrays_and_back,
handle_out_argument,
handle_nestable,
handle_array_like_without_promotion,
handle_device,
handle_backend_invalid,
)
from ivy.utils.exceptions import handle_ex... | Return the unique elements of an input array ``x``. .. admonition:: Data-dependent output shape :class: important The shapes of two of the output arrays for this function depend on the data values in the input array; hence, array libraries which build computation graphs (e.g., JAX, Dask, etc.) may find this function di... |
148,638 | from typing import Union, Tuple, Optional
import ivy
from ivy.func_wrapper import (
handle_array_function,
to_native_arrays_and_back,
handle_out_argument,
handle_nestable,
handle_array_like_without_promotion,
handle_device,
handle_backend_invalid,
)
from ivy.utils.exceptions import handle_ex... | Return the unique elements of an input array ``x`` and the corresponding counts for each unique element in ``x``. .. admonition:: Data-dependent output shape :class: important The shapes of two of the output arrays for this function depend on the data values in the input array; hence, array libraries which build comput... |
148,639 | from typing import Optional, Callable
import paddle
import ivy.functional.backends.paddle as paddle_backend
from itertools import chain
import ivy
from ivy.func_wrapper import with_unsupported_device_and_dtypes
from . import backend_version
from ivy.functional.ivy.gradients import (
_get_required_float_variables,
... | null |
148,640 | from typing import Optional, Callable
import paddle
import ivy.functional.backends.paddle as paddle_backend
from itertools import chain
import ivy
from ivy.func_wrapper import with_unsupported_device_and_dtypes
from . import backend_version
from ivy.functional.ivy.gradients import (
_get_required_float_variables,
... | null |
148,641 | from typing import Optional, Callable
import paddle
import ivy.functional.backends.paddle as paddle_backend
from itertools import chain
import ivy
from ivy.func_wrapper import with_unsupported_device_and_dtypes
from . import backend_version
from ivy.functional.ivy.gradients import (
_get_required_float_variables,
... | null |
148,642 | from typing import Optional, Callable
import paddle
import ivy.functional.backends.paddle as paddle_backend
from itertools import chain
import ivy
from ivy.func_wrapper import with_unsupported_device_and_dtypes
from . import backend_version
from ivy.functional.ivy.gradients import (
_get_required_float_variables,
... | null |
148,643 | import paddle
from typing import Optional, Union
import ivy
from ivy.func_wrapper import with_unsupported_device_and_dtypes, with_supported_dtypes
from . import backend_version
def argsort(
x: paddle.Tensor,
/,
*,
axis: int = -1,
descending: bool = False,
stable: bool = True,
out: Optional[... | null |
148,644 | import paddle
from typing import Optional, Union
import ivy
from ivy.func_wrapper import with_unsupported_device_and_dtypes, with_supported_dtypes
from . import backend_version
import ivy
from ivy.utils.exceptions import handle_exceptions
from ivy.functional.frontends import set_frontend_to_specific_version
... | null |
148,645 | import paddle
from typing import Optional, Union
import ivy
from ivy.func_wrapper import with_unsupported_device_and_dtypes, with_supported_dtypes
from . import backend_version
def sort(
x: paddle.Tensor,
/,
*,
axis: int = -1,
descending: bool = False,
stable: bool = True,
out: Optional[padd... | null |
148,646 | from numbers import Number
from typing import Optional, Tuple, Union
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_supported_dtypes,
with_unsupported_dtypes,
)
from . import backend_version
from .elementwise import _elementwise_helper
impor... | null |
148,647 | from numbers import Number
from typing import Optional, Tuple, Union
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_supported_dtypes,
with_unsupported_dtypes,
)
from . import backend_version
from .elementwise import _elementwise_helper
def a... | null |
148,648 | from numbers import Number
from typing import Optional, Tuple, Union
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_supported_dtypes,
with_unsupported_dtypes,
)
from . import backend_version
from .elementwise import _elementwise_helper
def _... | null |
148,649 | from numbers import Number
from typing import Optional, Tuple, Union
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_supported_dtypes,
with_unsupported_dtypes,
)
from . import backend_version
from .elementwise import _elementwise_helper
def no... | null |
148,650 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,651 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,652 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,653 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,654 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,655 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,656 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,657 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,658 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,659 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,660 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,661 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,662 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,663 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,664 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,665 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,666 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,667 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,668 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,669 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,670 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,671 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,672 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,673 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,674 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,675 | import paddle
from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
from collections import namedtuple
import ivy
from ivy import inf
from ivy.utils.exceptions import IvyNotImplementedException
import ivy.functional.backends.paddle as paddle_backend
from . import backend_version
from ivy.func_w... | null |
148,676 | import struct
from numbers import Number
from typing import Union, List, Optional, Sequence, Tuple
import numpy as np
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_unsupported_device_and_dtypes,
with_supported_device_and_dtypes,
)
from ivy.f... | null |
148,677 | import struct
from numbers import Number
from typing import Union, List, Optional, Sequence, Tuple
import numpy as np
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_unsupported_device_and_dtypes,
with_supported_device_and_dtypes,
)
from ivy.f... | null |
148,678 | import struct
from numbers import Number
from typing import Union, List, Optional, Sequence, Tuple
import numpy as np
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_unsupported_device_and_dtypes,
with_supported_device_and_dtypes,
)
from ivy.f... | null |
148,679 | import struct
from numbers import Number
from typing import Union, List, Optional, Sequence, Tuple
import numpy as np
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_unsupported_device_and_dtypes,
with_supported_device_and_dtypes,
)
from ivy.f... | null |
148,680 | import struct
from numbers import Number
from typing import Union, List, Optional, Sequence, Tuple
import numpy as np
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_unsupported_device_and_dtypes,
with_supported_device_and_dtypes,
)
from ivy.f... | null |
148,681 | import struct
from numbers import Number
from typing import Union, List, Optional, Sequence, Tuple
import numpy as np
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_unsupported_device_and_dtypes,
with_supported_device_and_dtypes,
)
from ivy.f... | null |
148,682 | import struct
from numbers import Number
from typing import Union, List, Optional, Sequence, Tuple
import numpy as np
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_unsupported_device_and_dtypes,
with_supported_device_and_dtypes,
)
from ivy.f... | null |
148,683 | import struct
from numbers import Number
from typing import Union, List, Optional, Sequence, Tuple
import numpy as np
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_unsupported_device_and_dtypes,
with_supported_device_and_dtypes,
)
from ivy.f... | null |
148,684 | import struct
from numbers import Number
from typing import Union, List, Optional, Sequence, Tuple
import numpy as np
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_unsupported_device_and_dtypes,
with_supported_device_and_dtypes,
)
from ivy.f... | null |
148,685 | import struct
from numbers import Number
from typing import Union, List, Optional, Sequence, Tuple
import numpy as np
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_unsupported_device_and_dtypes,
with_supported_device_and_dtypes,
)
from ivy.f... | null |
148,686 | import struct
from numbers import Number
from typing import Union, List, Optional, Sequence, Tuple
import numpy as np
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_unsupported_device_and_dtypes,
with_supported_device_and_dtypes,
)
from ivy.f... | null |
148,687 | import struct
from numbers import Number
from typing import Union, List, Optional, Sequence, Tuple
import numpy as np
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_unsupported_device_and_dtypes,
with_supported_device_and_dtypes,
)
from ivy.f... | null |
148,688 | import struct
from numbers import Number
from typing import Union, List, Optional, Sequence, Tuple
import numpy as np
import paddle
import ivy.functional.backends.paddle as paddle_backend
import ivy
from ivy.func_wrapper import (
with_unsupported_device_and_dtypes,
with_supported_device_and_dtypes,
)
from ivy.f... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.