id
int64
0
190k
prompt
stringlengths
21
13.4M
docstring
stringlengths
1
12k
146,789
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _logaddexp2( x1, x2, /, out=None, *, where=True, casting="same_kind", order=...
null
146,790
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def i0(x): return ivy.i0(x)
null
146,791
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_out, handle_numpy_dtype, handle_numpy_casting, from_zero_dim_arrays_to_scalar, ) def _conj( x, /, out=None, *, where=True, casting="same_kind", order="K", dtype=...
null
146,792
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_out, handle_numpy_dtype, handle_numpy_casting, from_zero_dim_arrays_to_scalar, ) def angle(z, deg=False): angle = ivy.angle(z, deg=deg) if deg and len(z.shape) == 0: angle = ivy...
null
146,793
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_out, handle_numpy_dtype, handle_numpy_casting, from_zero_dim_arrays_to_scalar, ) def imag(val): return ivy.imag(val)
null
146,794
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_out, handle_numpy_dtype, handle_numpy_casting, from_zero_dim_arrays_to_scalar, ) def real(val): return ivy.real(val)
null
146,795
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _fmax( x1, x2, /, out=None, *, where=True, casting="same_kind", order="K", ...
null
146,796
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _fmin( x1, x2, /, out=None, *, where=True, casting="same_kind", order="K", ...
null
146,797
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _maximum( x1, x2, /, out=None, *, where=True, casting="same_kind", order="K"...
null
146,798
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _minimum( x1, x2, /, out=None, *, where=True, casting="same_kind", order="K"...
null
146,799
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def max( a, /, *, axis=None, out=None, keepdims=False, initial=None, where=True, ...
null
146,800
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def min( a, /, *, axis=None, out=None, keepdims=False, initial=None, where=True, ...
null
146,801
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def _absolute( x, /, out...
null
146,802
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def _cbrt( x, /, out=Non...
null
146,803
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def _clip( a, a_min, a_m...
null
146,804
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def _copysign( x1, x2, /...
null
146,805
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def _fabs( x, /, out=Non...
null
146,806
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def _gcd( x1, x2, /, ...
null
146,807
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def _heaviside( x1, x2, ...
null
146,808
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def _lcm( x1, x2, /, ...
null
146,809
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def _reciprocal( x, /, o...
null
146,810
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def _sign( x, /, out=Non...
null
146,811
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def _sqrt( x, /, out=Non...
null
146,812
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def _square( x, /, out=N...
null
146,813
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def convolve(a, v, mode="full"): ...
null
146,814
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def gradient(f, *varargs, axis=None,...
null
146,815
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def interp(x, xp, fp, left=None, rig...
null
146,816
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def nan_to_num(x, copy=True, nan=0.0...
null
146,817
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) from ivy.func_wrapper import with_supported_dtypes, with_unsupported_dtypes def real_if_close(a, tol=100): a...
null
146,818
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _ceil( x, /, out=None, *, where=True, casting="same_kind", order="k", dtype=...
null
146,819
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _floor( x, /, out=None, *, where=True, casting="same_kind", order="K", dtype...
null
146,820
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def round(a, decimals=0, out=None): def _rint( x, /, out=None, *, where=True, casting="s...
null
146,821
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _trunc( x, /, out=None, *, where=True, casting="same_kind", order="k", dtype...
null
146,822
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def round(a, decimals=0, out=None): return ivy.round(a, decimals=decimals, out=out) def around(a, decimals=0...
null
146,823
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def fix( x, /, out=None, ): where = ivy.greater_equal(x, 0) return ivy.where(where, ivy.floo...
null
146,824
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def promote_types_of_numpy_inputs( ...
null
146,825
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def promote_types_of_numpy_inputs( ...
null
146,826
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _divmod( x1, x2, /, ...
null
146,827
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def promote_types_of_numpy_inputs( ...
null
146,828
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _floor_divide( x1, x2, ...
null
146,829
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _fmod( x1, x2, /, o...
null
146,830
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _mod( x1, x2, /, ou...
null
146,831
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _modf( x, /, out1_2=(No...
null
146,832
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def promote_types_of_numpy_inputs( ...
null
146,833
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _negative( x, /, out=No...
null
146,834
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _positive( x, /, out=No...
null
146,835
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def promote_types_of_numpy_inputs( ...
null
146,836
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _reciprocal( x, /, out=...
null
146,837
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _remainder( x1, x2, /, ...
null
146,838
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def promote_types_of_numpy_inputs( ...
null
146,839
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def promote_types_of_numpy_inputs( ...
null
146,840
import ivy import ivy.functional.frontends.numpy as np_frontend class dtype: def __init__(self, dtype_in, align=False, copy=False): self._ivy_dtype = ( to_ivy_dtype(dtype_in) if not isinstance(dtype_in, dtype) else dtype_in._ivy_dtype ) def __repr__(self): ...
null
146,841
import ivy def finfo(dtype): return ivy.finfo(dtype)
null
146,842
import ivy def iinfo(dtype): return ivy.iinfo(dtype)
null
146,843
import ivy from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back import ivy.functional.frontends.numpy as np_frontend def can_cast(from_, to, casting="safe"): ivy.utils.assertions.check_elem_in_list( casting, ["no", "equiv", "safe", "same_kind", "unsafe"], message="...
null
146,844
import ivy from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back import ivy.functional.frontends.numpy as np_frontend all_complex_dtypes = ["complex64", "complex128"] all_float_dtypes = [ "float16", "float32", "float64", ] all_int_dtypes = ["int8", "int16", "int32", "int64"] all_uin...
null
146,845
import ivy from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back import ivy.functional.frontends.numpy as np_frontend def promote_types(type1, type2, /): if isinstance(type1, np_frontend.dtype): type1 = type1._ivy_dtype if isinstance(type2, np_frontend.dtype): type2 = ty...
null
146,846
import ivy from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back def argsort( x, /, *, axis=-1, kind=None, order=None, ): return ivy.argsort(x, axis=axis)
null
146,847
import ivy from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back def lexsort(keys, /, *, axis=-1): return ivy.lexsort(keys, axis=axis)
null
146,848
import ivy from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back def msort(a): return ivy.msort(a)
null
146,849
import ivy from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back def sort(a, axis=-1, kind=None, order=None): def partition(a, kth, axis=-1, kind="introselect", order=None): sorted_arr = ivy.sort(a, axis=axis) for k in kth: index_to_remove = ivy.argwhere(a == sorted_arr[k])[0, ...
null
146,850
import ivy from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back def sort(a, axis=-1, kind=None, order=None): return ivy.sort(a, axis=axis) def sort_complex(a): return ivy.sort(a)
null
146,851
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def argwhere(a): return ivy.argwhere(a)
null
146,852
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def extract(cond, arr, /): if cond.dtype == "bool": return arr[cond] else...
null
146,853
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def nonzero(a): return ivy.nonzero(a) def flatnonzero(a): return ivy.nonzero(ivy....
null
146,854
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _nanargminmax(a, axis=None): # check nans nans = ivy.isnan(a).astype(ivy.bool)...
null
146,855
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def _nanargminmax(a, axis=None): # check nans nans = ivy.isnan(a).astype(ivy.bool)...
null
146,856
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) def searchsorted(a, v, side="left", sorter=None): return ivy.searchsorted(a, v, side=...
null
146,857
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, ) def count_nonzero(a, axis=None, *, keepdims=False): x = ivy.array(a) zero = ivy.zeros(ivy.shape(x), dtype=x.dtype) return ivy.sum( ivy.astype(ivy.not_equal(x, zero)...
null
146,858
import functools from typing import Callable, Any import inspect import platform import ivy import ivy.functional.frontends.numpy as np_frontend import ivy from ivy.utils.exceptions import handle_exceptions from ivy.functional.frontends import set_frontend_to_specific_version from ivy.functional....
null
146,859
import functools from typing import Callable, Any import inspect import platform import ivy import ivy.functional.frontends.numpy as np_frontend def _assert_array(args, dtype, scalar_check=False, casting="safe"): def _assert_no_array(args, dtype, scalar_check=False, none=False): def _assert_no_scalar(args, dtype, none=...
null
146,860
import functools from typing import Callable, Any import inspect import platform import ivy import ivy.functional.frontends.numpy as np_frontend import ivy from ivy.utils.exceptions import handle_exceptions from ivy.functional.frontends import set_frontend_to_specific_version from ivy.functional....
null
146,861
import functools from typing import Callable, Any import inspect import platform import ivy import ivy.functional.frontends.numpy as np_frontend def handle_numpy_dtype(fn: Callable) -> Callable: @functools.wraps(fn) def _handle_numpy_dtype(*args, dtype=None, **kwargs): if len(args) > (dtype_pos + 1): ...
null
146,862
import functools from typing import Callable, Any import inspect import platform import ivy import ivy.functional.frontends.numpy as np_frontend def _count_operands(subscript): def handle_numpy_out(fn: Callable) -> Callable: @functools.wraps(fn) def _handle_numpy_out(*args, **kwargs): if "out" not in k...
null
146,863
import functools from typing import Callable, Any import inspect import platform import ivy import ivy.functional.frontends.numpy as np_frontend def inputs_to_ivy_arrays(fn: Callable) -> Callable: def _inputs_to_ivy_arrays_np(*args, **kwargs): """Convert all `ndarray` instances in both the positional and ke...
Wrap `fn` so it receives and returns `ivy.Array` instances. Wrap `fn` so that input arrays are all converted to `ivy.Array` instances and return arrays are all converted to `ndarray` instances.
146,864
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, ) from ivy.func_wrapper import with_unsupported_dtypes def det(a): return ivy.det(a)
null
146,865
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, ) from ivy.func_wrapper import with_unsupported_dtypes def norm(x, ord=None, axis=None, keepdims=False): if axis is None and (ord is not None): if x.ndim not in (1, 2): ...
null
146,866
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, ) from ivy.func_wrapper import with_unsupported_dtypes def slogdet(a): sign, logabsdet = ivy.slogdet(a) return sign, logabsdet
null
146,867
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, ) from ivy.func_wrapper import with_unsupported_dtypes def trace(a, offset=0, axis1=0, axis2=1, out=None): ret = ivy.trace(a, offset=offset, axis1=axis1, axis2=axis2, out=out) re...
null
146,868
import ivy from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back def cholesky(a): return ivy.cholesky(a)
null
146,869
import ivy from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back def qr(a, mode="reduced"): return ivy.qr(a, mode=mode)
null
146,870
import ivy from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back def svd(a, full_matrices=True, compute_uv=True, hermitian=False): # Todo: conpute_uv and hermitian handling return ivy.svd(a, full_matrices=full_matrices, compute_uv=compute_uv)
null
146,871
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, ) def eigh(a, /, UPLO="L"): return ivy.eigh(a, UPLO=UPLO)
null
146,872
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, ) def eig(a): def eigvals(a): return ivy.eig(a)[0]
null
146,873
import ivy from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, from_zero_dim_arrays_to_scalar, ) def eigvalsh(a, /, UPLO="L"): return ivy.eigvalsh(a, UPLO=UPLO)
null
146,874
import ivy from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back from ivy.func_wrapper import with_unsupported_dtypes from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.linalg.norms_and_other_numbers import matrix_rank def pinv(a, rcond=...
null
146,875
import ivy from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back from ivy.func_wrapper import with_unsupported_dtypes from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.linalg.norms_and_other_numbers import matrix_rank def promote_types...
null
146,876
import ivy from ivy.functional.frontends.numpy.func_wrapper import to_ivy_arrays_and_back from ivy.func_wrapper import with_unsupported_dtypes from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy.functional.frontends.numpy.linalg.norms_and_other_numbers import matrix_rank def inv(a): re...
null
146,877
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy import with_unsupported_dtypes from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) ...
null
146,878
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy import with_unsupported_dtypes from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) ...
null
146,879
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy import with_unsupported_dtypes from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) ...
null
146,880
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy import with_unsupported_dtypes from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) ...
null
146,881
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy import with_unsupported_dtypes from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) ...
null
146,882
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy import with_unsupported_dtypes from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) ...
null
146,883
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy import with_unsupported_dtypes from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) ...
null
146,884
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy import with_unsupported_dtypes from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) ...
null
146,885
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy import with_unsupported_dtypes from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) ...
null
146,886
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy import with_unsupported_dtypes from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) ...
null
146,887
import ivy from ivy.functional.frontends.numpy import promote_types_of_numpy_inputs from ivy import with_unsupported_dtypes from ivy.functional.frontends.numpy.func_wrapper import ( to_ivy_arrays_and_back, handle_numpy_casting, handle_numpy_dtype, from_zero_dim_arrays_to_scalar, handle_numpy_out, ) ...
null
146,888
import struct import warnings import ivy import ivy.functional.frontends.numpy as np_frontend from ivy.functional.frontends.numpy.func_wrapper import _to_ivy_array from ivy.func_wrapper import ( with_supported_device_and_dtypes, ) def _to_bytes_helper(array, order="C"): def _integers_bytes_repr(item_val, /, *,...
null