diff --git a/dpnp/backend/extensions/vm/pow.hpp b/dpnp/backend/extensions/vm/pow.hpp new file mode 100644 index 000000000000..5b7d13ca94f8 --- /dev/null +++ b/dpnp/backend/extensions/vm/pow.hpp @@ -0,0 +1,81 @@ +//***************************************************************************** +// Copyright (c) 2023, Intel Corporation +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are met: +// - Redistributions of source code must retain the above copyright notice, +// this list of conditions and the following disclaimer. +// - Redistributions in binary form must reproduce the above copyright notice, +// this list of conditions and the following disclaimer in the documentation +// and/or other materials provided with the distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +// THE POSSIBILITY OF SUCH DAMAGE. +//***************************************************************************** + +#pragma once + +#include + +#include "common.hpp" +#include "types_matrix.hpp" + +namespace dpnp +{ +namespace backend +{ +namespace ext +{ +namespace vm +{ +template +sycl::event pow_contig_impl(sycl::queue exec_q, + const std::int64_t n, + const char *in_a, + const char *in_b, + char *out_y, + const std::vector &depends) +{ + type_utils::validate_type_for_device(exec_q); + + const T *a = reinterpret_cast(in_a); + const T *b = reinterpret_cast(in_b); + T *y = reinterpret_cast(out_y); + + return mkl_vm::pow(exec_q, + n, // number of elements to be calculated + a, // pointer `a` containing 1st input vector of size n + b, // pointer `b` containing 2nd input vector of size n + y, // pointer `y` to the output vector of size n + depends); +} + +template +struct PowContigFactory +{ + fnT get() + { + if constexpr (std::is_same_v< + typename types::PowOutputType::value_type, void>) + { + return nullptr; + } + else { + return pow_contig_impl; + } + } +}; +} // namespace vm +} // namespace ext +} // namespace backend +} // namespace dpnp diff --git a/dpnp/backend/extensions/vm/types_matrix.hpp b/dpnp/backend/extensions/vm/types_matrix.hpp index df02f409b739..3fabd38ce388 100644 --- a/dpnp/backend/extensions/vm/types_matrix.hpp +++ b/dpnp/backend/extensions/vm/types_matrix.hpp @@ -203,6 +203,31 @@ struct MulOutputType dpctl_td_ns::DefaultResultEntry>::result_type; }; +/** + * @brief A factory to define pairs of supported types for which + * MKL VM library provides support in oneapi::mkl::vm::pow function. + * + * @tparam T Type of input vectors `a` and `b` and of result vector `y`. + */ +template +struct PowOutputType +{ + using value_type = typename std::disjunction< + dpctl_td_ns::BinaryTypeMapResultEntry, + T, + std::complex, + std::complex>, + dpctl_td_ns::BinaryTypeMapResultEntry, + T, + std::complex, + std::complex>, + dpctl_td_ns::BinaryTypeMapResultEntry, + dpctl_td_ns::BinaryTypeMapResultEntry, + dpctl_td_ns::DefaultResultEntry>::result_type; +}; + /** * @brief A factory to define pairs of supported types for which * MKL VM library provides support in oneapi::mkl::vm::rint function. diff --git a/dpnp/backend/extensions/vm/vm_py.cpp b/dpnp/backend/extensions/vm/vm_py.cpp index d2949d14bb22..d1cec34680fb 100644 --- a/dpnp/backend/extensions/vm/vm_py.cpp +++ b/dpnp/backend/extensions/vm/vm_py.cpp @@ -39,6 +39,7 @@ #include "floor.hpp" #include "ln.hpp" #include "mul.hpp" +#include "pow.hpp" #include "round.hpp" #include "sin.hpp" #include "sqr.hpp" @@ -61,6 +62,7 @@ static unary_impl_fn_ptr_t floor_dispatch_vector[dpctl_td_ns::num_types]; static unary_impl_fn_ptr_t conj_dispatch_vector[dpctl_td_ns::num_types]; static unary_impl_fn_ptr_t ln_dispatch_vector[dpctl_td_ns::num_types]; static binary_impl_fn_ptr_t mul_dispatch_vector[dpctl_td_ns::num_types]; +static binary_impl_fn_ptr_t pow_dispatch_vector[dpctl_td_ns::num_types]; static unary_impl_fn_ptr_t round_dispatch_vector[dpctl_td_ns::num_types]; static unary_impl_fn_ptr_t sin_dispatch_vector[dpctl_td_ns::num_types]; static unary_impl_fn_ptr_t sqr_dispatch_vector[dpctl_td_ns::num_types]; @@ -303,6 +305,36 @@ PYBIND11_MODULE(_vm_impl, m) py::arg("dst")); } + // BinaryUfunc: ==== Pow(x1, x2) ==== + { + vm_ext::init_ufunc_dispatch_vector( + pow_dispatch_vector); + + auto pow_pyapi = [&](sycl::queue exec_q, arrayT src1, arrayT src2, + arrayT dst, const event_vecT &depends = {}) { + return vm_ext::binary_ufunc(exec_q, src1, src2, dst, depends, + pow_dispatch_vector); + }; + m.def("_pow", pow_pyapi, + "Call `pow` function from OneMKL VM library to performs element " + "by element exponentiation of vector `src1` raised to the power " + "of vector `src2` to resulting vector `dst`", + py::arg("sycl_queue"), py::arg("src1"), py::arg("src2"), + py::arg("dst"), py::arg("depends") = py::list()); + + auto pow_need_to_call_pyapi = [&](sycl::queue exec_q, arrayT src1, + arrayT src2, arrayT dst) { + return vm_ext::need_to_call_binary_ufunc(exec_q, src1, src2, dst, + pow_dispatch_vector); + }; + m.def("_mkl_pow_to_call", pow_need_to_call_pyapi, + "Check input arguments to answer if `pow` function from " + "OneMKL VM library can be used", + py::arg("sycl_queue"), py::arg("src1"), py::arg("src2"), + py::arg("dst")); + } + // UnaryUfunc: ==== Round(x) ==== { vm_ext::init_ufunc_dispatch_vector, func_type_map_t::find_type>}), ...); - ((fmap[DPNPFuncName::DPNP_FN_POWER_EXT][FT1][FTs] = - {populate_func_types(), - (void *)dpnp_power_c_ext< - func_type_map_t::find_type()>, - func_type_map_t::find_type, - func_type_map_t::find_type>}), - ...); ((fmap[DPNPFuncName::DPNP_FN_SUBTRACT_EXT][FT1][FTs] = {populate_func_types(), (void *)dpnp_subtract_c_ext< diff --git a/dpnp/dpnp_algo/dpnp_algo.pxd b/dpnp/dpnp_algo/dpnp_algo.pxd index 568fc76abc7d..eab29517f730 100644 --- a/dpnp/dpnp_algo/dpnp_algo.pxd +++ b/dpnp/dpnp_algo/dpnp_algo.pxd @@ -128,8 +128,6 @@ cdef extern from "dpnp_iface_fptr.hpp" namespace "DPNPFuncName": # need this na DPNP_FN_HYPOT_EXT DPNP_FN_IDENTITY DPNP_FN_IDENTITY_EXT - DPNP_FN_INITVAL - DPNP_FN_INITVAL_EXT DPNP_FN_INV DPNP_FN_INV_EXT DPNP_FN_KRON @@ -164,8 +162,6 @@ cdef extern from "dpnp_iface_fptr.hpp" namespace "DPNPFuncName": # need this na DPNP_FN_PARTITION DPNP_FN_PARTITION_EXT DPNP_FN_PLACE - DPNP_FN_POWER - DPNP_FN_POWER_EXT DPNP_FN_PROD DPNP_FN_PROD_EXT DPNP_FN_PTP @@ -407,7 +403,6 @@ cpdef dpnp_descriptor dpnp_matmul(dpnp_descriptor in_array1, dpnp_descriptor in_ """ Array creation routines """ -cpdef dpnp_descriptor dpnp_init_val(shape, dtype, value) cpdef dpnp_descriptor dpnp_copy(dpnp_descriptor x1) """ @@ -421,8 +416,6 @@ cpdef dpnp_descriptor dpnp_maximum(dpnp_descriptor x1_obj, dpnp_descriptor x2_ob dpnp_descriptor out=*, object where=*) cpdef dpnp_descriptor dpnp_minimum(dpnp_descriptor x1_obj, dpnp_descriptor x2_obj, object dtype=*, dpnp_descriptor out=*, object where=*) -cpdef dpnp_descriptor dpnp_power(dpnp_descriptor x1_obj, dpnp_descriptor x2_obj, object dtype=*, - dpnp_descriptor out=*, object where=*) """ Array manipulation routines diff --git a/dpnp/dpnp_algo/dpnp_algo.pyx b/dpnp/dpnp_algo/dpnp_algo.pyx index 60bbd2149d3b..0bde1b25fb2e 100644 --- a/dpnp/dpnp_algo/dpnp_algo.pyx +++ b/dpnp/dpnp_algo/dpnp_algo.pyx @@ -56,7 +56,6 @@ import numpy __all__ = [ "dpnp_astype", "dpnp_flatten", - "dpnp_init_val", "dpnp_queue_initialize", ] @@ -85,9 +84,6 @@ ctypedef c_dpctl.DPCTLSyclEventRef(*fptr_dpnp_flatten_t)(c_dpctl.DPCTLSyclQueueR const shape_elem_type * , const shape_elem_type * , const long * , const c_dpctl.DPCTLEventVectorRef) -ctypedef c_dpctl.DPCTLSyclEventRef(*fptr_dpnp_initval_t)(c_dpctl.DPCTLSyclQueueRef, - void *, void * , size_t, - const c_dpctl.DPCTLEventVectorRef) cpdef utils.dpnp_descriptor dpnp_astype(utils.dpnp_descriptor x1, dtype): @@ -168,39 +164,6 @@ cpdef utils.dpnp_descriptor dpnp_flatten(utils.dpnp_descriptor x1): return result -cpdef utils.dpnp_descriptor dpnp_init_val(shape, dtype, value): - """ - same as dpnp_full(). TODO remove code duplication - """ - cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(dtype) - - cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_INITVAL_EXT, param1_type, param1_type) - - cdef utils.dpnp_descriptor result = utils_py.create_output_descriptor_py(shape, dtype, None) - - result_obj = result.get_array() - - # TODO: find better way to pass single value with type conversion - cdef utils.dpnp_descriptor val_arr = utils_py.create_output_descriptor_py((1, ), - dtype, - None, - device=result_obj.sycl_device, - usm_type=result_obj.usm_type, - sycl_queue=result_obj.sycl_queue) - val_arr.get_pyobj()[0] = value - - cdef c_dpctl.SyclQueue q = result_obj.sycl_queue - cdef c_dpctl.DPCTLSyclQueueRef q_ref = q.get_queue_ref() - - cdef fptr_dpnp_initval_t func = kernel_data.ptr - cdef c_dpctl.DPCTLSyclEventRef event_ref = func(q_ref, result.get_data(), val_arr.get_data(), result.size, NULL) - - with nogil: c_dpctl.DPCTLEvent_WaitAndThrow(event_ref) - c_dpctl.DPCTLEvent_Delete(event_ref) - - return result - - cpdef dpnp_queue_initialize(): """ Initialize SYCL queue which will be used for any library operations. diff --git a/dpnp/dpnp_algo/dpnp_algo_mathematical.pxi b/dpnp/dpnp_algo/dpnp_algo_mathematical.pxi index 7ca664fceaba..c0df1c290d62 100644 --- a/dpnp/dpnp_algo/dpnp_algo_mathematical.pxi +++ b/dpnp/dpnp_algo/dpnp_algo_mathematical.pxi @@ -55,7 +55,6 @@ __all__ += [ "dpnp_nancumsum", "dpnp_nanprod", "dpnp_nansum", - "dpnp_power", "dpnp_prod", "dpnp_sum", "dpnp_trapz", @@ -417,14 +416,6 @@ cpdef utils.dpnp_descriptor dpnp_nansum(utils.dpnp_descriptor x1): return dpnp_sum(result) -cpdef utils.dpnp_descriptor dpnp_power(utils.dpnp_descriptor x1_obj, - utils.dpnp_descriptor x2_obj, - object dtype=None, - utils.dpnp_descriptor out=None, - object where=True): - return call_fptr_2in_1out_strides(DPNP_FN_POWER_EXT, x1_obj, x2_obj, dtype, out, where, func_name="power") - - cpdef utils.dpnp_descriptor dpnp_prod(utils.dpnp_descriptor x1, object axis=None, object dtype=None, diff --git a/dpnp/dpnp_algo/dpnp_elementwise_common.py b/dpnp/dpnp_algo/dpnp_elementwise_common.py index 8397e35eb2fb..c4d263ba514d 100644 --- a/dpnp/dpnp_algo/dpnp_elementwise_common.py +++ b/dpnp/dpnp_algo/dpnp_elementwise_common.py @@ -27,6 +27,8 @@ # ***************************************************************************** +from sys import platform + import dpctl.tensor._tensor_impl as ti from dpctl.tensor._elementwise_common import ( BinaryElementwiseFunc, @@ -68,6 +70,7 @@ "dpnp_multiply", "dpnp_negative", "dpnp_not_equal", + "dpnp_power", "dpnp_proj", "dpnp_remainder", "dpnp_right_shift", @@ -1460,6 +1463,69 @@ def dpnp_not_equal(x1, x2, out=None, order="K"): return dpnp_array._create_from_usm_ndarray(res_usm) +_power_docstring_ = """ +power(x1, x2, out=None, order="K") + +Calculates `x1_i` raised to `x2_i` for each element `x1_i` of the input array +`x1` with the respective element `x2_i` of the input array `x2`. + +Args: + x1 (dpnp.ndarray): + First input array, expected to have numeric data type. + x2 (dpnp.ndarray): + Second input array, also expected to have numeric data type. + out ({None, dpnp.ndarray}, optional): + Output array to populate. Array must have the correct + shape and the expected data type. + order ("C","F","A","K", None, optional): + Output array, if parameter `out` is `None`. + Default: "K". +Returns: + dpnp.ndarray: + An array containing the result of element-wise of raising each element + to a specified power. + The data type of the returned array is determined by the Type Promotion Rules. +""" + + +def _call_pow(src1, src2, dst, sycl_queue, depends=None): + """A callback to register in BinaryElementwiseFunc class of dpctl.tensor""" + + if depends is None: + depends = [] + + # TODO: remove this check when OneMKL is fixed on Windows + is_win = platform.startswith("win") + + if not is_win and vmi._mkl_pow_to_call(sycl_queue, src1, src2, dst): + # call pybind11 extension for pow() function from OneMKL VM + return vmi._pow(sycl_queue, src1, src2, dst, depends) + return ti._pow(src1, src2, dst, sycl_queue, depends) + + +pow_func = BinaryElementwiseFunc( + "pow", ti._pow_result_type, _call_pow, _power_docstring_ +) + + +def dpnp_power(x1, x2, out=None, order="K"): + """ + Invokes pow() function from pybind11 extension of OneMKL VM if possible. + + Otherwise fully relies on dpctl.tensor implementation for pow() function. + """ + + # dpctl.tensor only works with usm_ndarray or scalar + x1_usm_or_scalar = dpnp.get_usm_ndarray_or_scalar(x1) + x2_usm_or_scalar = dpnp.get_usm_ndarray_or_scalar(x2) + out_usm = None if out is None else dpnp.get_usm_ndarray(out) + + res_usm = pow_func( + x1_usm_or_scalar, x2_usm_or_scalar, out=out_usm, order=order + ) + return dpnp_array._create_from_usm_ndarray(res_usm) + + _proj_docstring = """ proj(x, out=None, order="K") diff --git a/dpnp/dpnp_iface_mathematical.py b/dpnp/dpnp_iface_mathematical.py index e51ef47f89ee..4fad31bf9ee3 100644 --- a/dpnp/dpnp_iface_mathematical.py +++ b/dpnp/dpnp_iface_mathematical.py @@ -58,6 +58,7 @@ dpnp_floor_divide, dpnp_multiply, dpnp_negative, + dpnp_power, dpnp_proj, dpnp_remainder, dpnp_round, @@ -1738,8 +1739,9 @@ def negative( ) -def proj( - x, +def power( + x1, + x2, /, out=None, *, @@ -1749,55 +1751,6 @@ def proj( subok=True, **kwargs, ): - """ - Returns the projection of a number onto the Riemann sphere. - - For all infinite complex numbers (including the cases where one component is infinite and the other is `NaN`), - the function returns `(inf, 0.0)` or `(inf, -0.0)`. - For finite complex numbers, the input is returned. - All real-valued numbers are treated as complex numbers with positive zero imaginary part. - - Returns - ------- - out : dpnp.ndarray - The projection of each element of `x`. - - Limitations - ----------- - Parameters `x` is only supported as either :class:`dpnp.ndarray` or :class:`dpctl.tensor.usm_ndarray`. - Parameters `where`, `dtype` and `subok` are supported with their default values. - Keyword argument `kwargs` is currently unsupported. - Input array data types are limited by supported DPNP :ref:`Data types`. - - See Also - -------- - :obj:`dpnp.abs` : Returns the magnitude of a complex number, element-wise. - :obj:`dpnp.conj` : Return the complex conjugate, element-wise. - - Examples - -------- - >>> import dpnp as np - >>> np.proj(np.array([1, -2.3, 2.1-1.7j])) - array([ 1. +0.j, -2.3+0.j, 2.1-1.7.j]) - - >>> np.proj(np.array([complex(1,np.inf), complex(1,-np.inf), complex(np.inf,-1),])) - array([inf+0.j, inf-0.j, inf-0.j]) - """ - - return check_nd_call_func( - None, - dpnp_proj, - x, - out=out, - where=where, - order=order, - dtype=dtype, - subok=subok, - **kwargs, - ) - - -def power(x1, x2, /, out=None, *, where=True, dtype=None, subok=True, **kwargs): """ First array elements raised to powers from second array, element-wise. @@ -1830,68 +1783,50 @@ def power(x1, x2, /, out=None, *, where=True, dtype=None, subok=True, **kwargs): Example ------- >>> import dpnp as dp - >>> a = dp.array([1, 2, 3, 4, 5]) - >>> b = dp.array([2, 2, 2, 2, 2]) - >>> result = dp.power(a, b) - >>> [x for x in result] - [1, 4, 9, 16, 25] + >>> a = dp.arange(6) + >>> dp.power(a, 3) + array([ 0, 1, 8, 27, 64, 125]) - """ + Raise the bases to different exponents. - if kwargs: - pass - elif where is not True: - pass - elif dtype is not None: - pass - elif subok is not True: - pass - elif dpnp.isscalar(x1) and dpnp.isscalar(x2): - # at least either x1 or x2 has to be an array - pass - else: - # get USM type and queue to copy scalar from the host memory into a USM allocation - usm_type, queue = ( - get_usm_allocations([x1, x2]) - if dpnp.isscalar(x1) or dpnp.isscalar(x2) - else (None, None) - ) + >>> b = dp.array([1.0, 2.0, 3.0, 3.0, 2.0, 1.0]) + >>> dp.power(a, b) + array([ 0., 1., 8., 27., 16., 5.]) - x1_desc = dpnp.get_dpnp_descriptor( - x1, - copy_when_strides=False, - copy_when_nondefault_queue=False, - alloc_usm_type=usm_type, - alloc_queue=queue, - ) - x2_desc = dpnp.get_dpnp_descriptor( - x2, - copy_when_strides=False, - copy_when_nondefault_queue=False, - alloc_usm_type=usm_type, - alloc_queue=queue, - ) - if x1_desc and x2_desc: - if out is not None: - if not isinstance(out, (dpnp.ndarray, dpt.usm_ndarray)): - raise TypeError( - "return array must be of supported array type" - ) - out_desc = ( - dpnp.get_dpnp_descriptor( - out, copy_when_nondefault_queue=False - ) - or None - ) - else: - out_desc = None + The effect of broadcasting. - return dpnp_power( - x1_desc, x2_desc, dtype=dtype, out=out_desc, where=where - ).get_pyobj() + >>> c = dp.array([[1, 2, 3, 3, 2, 1], [1, 2, 3, 3, 2, 1]]) + >>> dp.power(a, c) + array([[ 0, 1, 8, 27, 16, 5], + [ 0, 1, 8, 27, 16, 5]]) - return call_origin( - numpy.power, x1, x2, dtype=dtype, out=out, where=where, **kwargs + The ``**`` operator can be used as a shorthand for ``power`` on + :class:`dpnp.ndarray`. + + >>> b = dp.array([1, 2, 3, 3, 2, 1]) + >>> a = dp.arange(6) + >>> a ** b + array([ 0, 1, 8, 27, 16, 5]) + + Negative values raised to a non-integral value will result in ``nan``. + + >>> d = dp.array([-1.0, -4.0]) + >>> dp.power(d, 1.5) + array([nan, nan]) + + """ + + return check_nd_call_func( + numpy.power, + dpnp_power, + x1, + x2, + out=out, + where=where, + order=order, + dtype=dtype, + subok=subok, + **kwargs, ) @@ -1955,6 +1890,65 @@ def prod( ) +def proj( + x, + /, + out=None, + *, + order="K", + where=True, + dtype=None, + subok=True, + **kwargs, +): + """ + Returns the projection of a number onto the Riemann sphere. + + For all infinite complex numbers (including the cases where one component is infinite and the other is `NaN`), + the function returns `(inf, 0.0)` or `(inf, -0.0)`. + For finite complex numbers, the input is returned. + All real-valued numbers are treated as complex numbers with positive zero imaginary part. + + Returns + ------- + out : dpnp.ndarray + The projection of each element of `x`. + + Limitations + ----------- + Parameters `x` is only supported as either :class:`dpnp.ndarray` or :class:`dpctl.tensor.usm_ndarray`. + Parameters `where`, `dtype` and `subok` are supported with their default values. + Keyword argument `kwargs` is currently unsupported. + Input array data types are limited by supported DPNP :ref:`Data types`. + + See Also + -------- + :obj:`dpnp.abs` : Returns the magnitude of a complex number, element-wise. + :obj:`dpnp.conj` : Return the complex conjugate, element-wise. + + Examples + -------- + >>> import dpnp as np + >>> np.proj(np.array([1, -2.3, 2.1-1.7j])) + array([ 1. +0.j, -2.3+0.j, 2.1-1.7.j]) + + >>> np.proj(np.array([complex(1,np.inf), complex(1,-np.inf), complex(np.inf,-1),])) + array([inf+0.j, inf-0.j, inf-0.j]) + """ + + return check_nd_call_func( + None, + dpnp_proj, + x, + out=out, + where=where, + order=order, + dtype=dtype, + subok=subok, + **kwargs, + ) + + def rint( x, /, diff --git a/tests/skipped_tests_gpu_no_fp64.tbl b/tests/skipped_tests_gpu_no_fp64.tbl index 5fd210dcf54e..1339c7cfba50 100644 --- a/tests/skipped_tests_gpu_no_fp64.tbl +++ b/tests/skipped_tests_gpu_no_fp64.tbl @@ -5,342 +5,6 @@ tests/test_linalg.py::test_norm1[None-3-[7]] tests/test_linalg.py::test_norm1[None-3-[1, 2]] tests/test_linalg.py::test_norm1[None-3-[1, 0]] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-bool_-bool_] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-bool_-int32] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-bool_-int64] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-bool_-None] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-int32-bool_] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-int32-int32] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-int32-int64] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-int32-None] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-int64-bool_] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-int64-int32] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-int64-int64] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-int64-None] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-None-bool_] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-None-int32] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-None-int64] -tests/test_mathematical.py::test_op_multiple_dtypes[[[1, 2], [3, 4]]-power-None-None] -tests/test_mathematical.py::TestMathematical::test_power[bool_-lhs0-rhs0] -tests/test_mathematical.py::TestMathematical::test_power[bool_-lhs0-rhs1] -tests/test_mathematical.py::TestMathematical::test_power[bool_-lhs0-3] -tests/test_mathematical.py::TestMathematical::test_power[bool_-lhs1-rhs0] -tests/test_mathematical.py::TestMathematical::test_power[bool_-lhs1-rhs1] -tests/test_mathematical.py::TestMathematical::test_power[bool_-lhs1-3] -tests/test_mathematical.py::TestMathematical::test_power[int32-lhs0-rhs0] -tests/test_mathematical.py::TestMathematical::test_power[int32-lhs0-rhs1] -tests/test_mathematical.py::TestMathematical::test_power[int32-lhs0-3] -tests/test_mathematical.py::TestMathematical::test_power[int32-lhs1-rhs0] -tests/test_mathematical.py::TestMathematical::test_power[int32-lhs1-rhs1] -tests/test_mathematical.py::TestMathematical::test_power[int32-lhs1-3] -tests/test_mathematical.py::TestMathematical::test_power[int64-lhs0-rhs0] -tests/test_mathematical.py::TestMathematical::test_power[int64-lhs0-rhs1] -tests/test_mathematical.py::TestMathematical::test_power[int64-lhs0-3] -tests/test_mathematical.py::TestMathematical::test_power[int64-lhs1-rhs0] -tests/test_mathematical.py::TestMathematical::test_power[int64-lhs1-rhs1] -tests/test_mathematical.py::TestMathematical::test_power[int64-lhs1-3] -tests/test_mathematical.py::TestMathematical::test_power[None-lhs0-rhs0] -tests/test_mathematical.py::TestMathematical::test_power[None-lhs0-3] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-0-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-0-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-0-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-0-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-0-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-0-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-0-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-0-power-None-int] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-1-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-1-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-1-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-1-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-1-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-1-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-1-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-1-power-None-int] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-5-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-5-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-5-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-5-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-5-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-5-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-5-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[0, 0], [0, 0]]-5-power-None-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-0-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-0-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-0-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-0-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-0-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-0-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-0-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-0-power-None-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-1-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-1-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-1-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-1-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-1-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-1-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-1-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-1-power-None-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-5-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-5-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-5-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-5-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-5-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-5-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-5-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [1, 2]]-5-power-None-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-0-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-0-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-0-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-0-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-0-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-0-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-0-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-0-power-None-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-1-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-1-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-1-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-1-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-1-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-1-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-1-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-1-power-None-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-5-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-5-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-5-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-5-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-5-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-5-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-5-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[1, 2], [3, 4]]-5-power-None-int] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-0-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-0-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-0-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-0-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-0-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-0-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-0-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-0-power-None-int] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-power-None-int] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-power-None-int] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-0-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-0-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-0-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-0-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-0-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-0-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-0-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-0-power-None-int] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-power-None-int] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-power-bool_-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-power-bool_-int] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-power-int32-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-power-int32-int] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-power-int64-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-power-int64-int] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-power-None-bool] -tests/test_mathematical.py::test_op_with_scalar[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-power-None-int] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1.5-bool_-bool_] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1.5-bool_-int32] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1.5-bool_-int64] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1.5-int32-bool_] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1.5-int32-int32] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1.5-int32-int64] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1.5-int64-bool_] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1.5-int64-int32] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1.5-int64-int64] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1.5-None-bool_] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1.5-None-int32] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1.5-None-int64] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1-bool_-bool_] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1-bool_-int32] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1-bool_-int64] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1-int32-bool_] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1-int32-int32] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1-int32-int64] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1-int64-bool_] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1-int64-int32] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1-int64-int64] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1-None-bool_] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1-None-int32] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-1-None-int64] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-5-bool_-bool_] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-5-bool_-int32] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-5-bool_-int64] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-5-int32-bool_] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-5-int32-int32] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-5-int32-int64] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-5-int64-bool_] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-5-int64-int32] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-5-int64-int64] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-5-None-bool_] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-5-None-int32] -tests/test_mathematical.py::test_power[[[0, 0], [0, 0]]-5-None-int64] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1.5-bool_-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1.5-bool_-int32] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1.5-bool_-int64] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1.5-int32-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1.5-int32-int32] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1.5-int32-int64] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1.5-int64-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1.5-int64-int32] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1.5-int64-int64] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1.5-None-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1.5-None-int32] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1.5-None-int64] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1-bool_-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1-bool_-int32] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1-bool_-int64] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1-int32-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1-int32-int32] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1-int32-int64] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1-int64-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1-int64-int32] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1-int64-int64] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1-None-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1-None-int32] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-1-None-int64] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-5-bool_-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-5-bool_-int32] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-5-bool_-int64] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-5-int32-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-5-int32-int32] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-5-int32-int64] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-5-int64-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-5-int64-int32] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-5-int64-int64] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-5-None-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-5-None-int32] -tests/test_mathematical.py::test_power[[[1, 2], [1, 2]]-5-None-int64] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1.5-bool_-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1.5-bool_-int32] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1.5-bool_-int64] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1.5-int32-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1.5-int32-int32] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1.5-int32-int64] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1.5-int64-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1.5-int64-int32] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1.5-int64-int64] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1.5-None-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1.5-None-int32] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1.5-None-int64] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1-bool_-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1-bool_-int32] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1-bool_-int64] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1-int32-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1-int32-int32] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1-int32-int64] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1-int64-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1-int64-int32] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1-int64-int64] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1-None-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1-None-int32] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-1-None-int64] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-5-bool_-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-5-bool_-int32] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-5-bool_-int64] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-5-int32-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-5-int32-int32] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-5-int32-int64] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-5-int64-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-5-int64-int32] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-5-int64-int64] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-5-None-bool_] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-5-None-int32] -tests/test_mathematical.py::test_power[[[1, 2], [3, 4]]-5-None-int64] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1.5-bool_-bool_] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1.5-bool_-int32] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1.5-bool_-int64] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1.5-int32-bool_] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1.5-int32-int32] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1.5-int32-int64] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1.5-int64-bool_] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1.5-int64-int32] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1.5-int64-int64] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1.5-None-bool_] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1.5-None-int32] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1.5-None-int64] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-bool_-bool_] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-bool_-int32] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-bool_-int64] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-int32-bool_] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-int32-int32] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-int32-int64] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-int64-bool_] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-int64-int32] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-int64-int64] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-None-bool_] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-None-int32] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-1-None-int64] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-bool_-bool_] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-bool_-int32] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-bool_-int64] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-int32-bool_] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-int32-int32] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-int32-int64] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-int64-bool_] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-int64-int32] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-int64-int64] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-None-bool_] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-None-int32] -tests/test_mathematical.py::test_power[[[[1, 2], [3, 4]], [[1, 2], [2, 1]], [[1, 3], [3, 1]]]-5-None-int64] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1.5-bool_-bool_] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1.5-bool_-int32] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1.5-bool_-int64] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1.5-int32-bool_] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1.5-int32-int32] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1.5-int32-int64] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1.5-int64-bool_] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1.5-int64-int32] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1.5-int64-int64] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1.5-None-bool_] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1.5-None-int32] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1.5-None-int64] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-bool_-bool_] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-bool_-int32] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-bool_-int64] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-int32-bool_] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-int32-int32] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-int32-int64] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-int64-bool_] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-int64-int32] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-int64-int64] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-None-bool_] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-None-int32] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-1-None-int64] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-bool_-bool_] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-bool_-int32] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-bool_-int64] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-int32-bool_] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-int32-int32] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-int32-int64] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-int64-bool_] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-int64-int32] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-int64-int64] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-None-bool_] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-None-int32] -tests/test_mathematical.py::test_power[[[[[1, 2], [3, 4]], [[1, 2], [2, 1]]], [[[1, 3], [3, 1]], [[0, 1], [1, 3]]]]-5-None-int64] tests/test_mathematical.py::TestGradient::test_gradient_y1[array0] tests/test_mathematical.py::TestGradient::test_gradient_y1[array1] tests/test_mathematical.py::TestGradient::test_gradient_y1[array2] @@ -350,24 +14,6 @@ tests/test_mathematical.py::TestGradient::test_gradient_y1_dx[2-array2] tests/test_mathematical.py::TestGradient::test_gradient_y1_dx[3.5-array0] tests/test_mathematical.py::TestGradient::test_gradient_y1_dx[3.5-array1] tests/test_mathematical.py::TestGradient::test_gradient_y1_dx[3.5-array2] -tests/test_mathematical.py::TestPower::test_power[complex64] -tests/test_mathematical.py::TestPower::test_out_dtypes[bool_] -tests/test_mathematical.py::TestPower::test_out_dtypes[int32] -tests/test_mathematical.py::TestPower::test_out_dtypes[int64] -tests/test_mathematical.py::TestPower::test_out_dtypes[float32] -tests/test_mathematical.py::TestPower::test_out_overlap[int32] -tests/test_mathematical.py::TestPower::test_out_overlap[int64] -tests/test_mathematical.py::TestPower::test_inplace_strided_out[int32] -tests/test_mathematical.py::TestPower::test_inplace_strided_out[int64] -tests/test_mathematical.py::TestPower::test_invalid_shape[(0,)] -tests/test_mathematical.py::TestPower::test_invalid_shape[(15, )] -tests/test_mathematical.py::TestPower::test_invalid_shape[(2,2)] -tests/test_mathematical.py::TestPower::test_integer_power_of_0_or_1[int32-0] -tests/test_mathematical.py::TestPower::test_integer_power_of_0_or_1[int32-1] -tests/test_mathematical.py::TestPower::test_integer_power_of_0_or_1[int64-0] -tests/test_mathematical.py::TestPower::test_integer_power_of_0_or_1[int64-1] -tests/test_mathematical.py::TestPower::test_integer_to_negative_power[int32] -tests/test_mathematical.py::TestPower::test_integer_to_negative_power[int64] tests/test_strides.py::test_strides_1arg[(10,)-int32-arccos] tests/test_strides.py::test_strides_1arg[(10,)-int32-arccosh] @@ -429,24 +75,11 @@ tests/test_strides.py::test_strides_1arg[(10,)-None-tanh] tests/test_strides.py::test_strides_tan[(10,)-int32] tests/test_strides.py::test_strides_tan[(10,)-int64] tests/test_strides.py::test_strides_tan[(10,)-None] -tests/test_strides.py::test_strides_2args[(3, 3)-int32-power] -tests/test_strides.py::test_strides_2args[(3, 3)-int64-power] -tests/test_strides.py::test_strides_2args[(3, 3)-None-power] -tests/test_strides.py::test_strided_out_2args[int32-power] -tests/test_strides.py::test_strided_out_2args[int64-power] -tests/test_strides.py::test_strided_out_2args[float32-power] -tests/test_strides.py::test_strided_out_2args[None-power] -tests/test_strides.py::test_strided_in_out_2args[int32-power] -tests/test_strides.py::test_strided_in_out_2args[int64-power] tests/test_sycl_queue.py::test_array_creation[opencl:gpu:0-arange-arg0-kwargs0] tests/test_sycl_queue.py::test_array_creation[level_zero:gpu:0-arange-arg0-kwargs0] tests/test_sycl_queue.py::test_1in_1out[opencl:gpu:0-gradient-data10] tests/test_sycl_queue.py::test_1in_1out[level_zero:gpu:0-gradient-data10] -tests/test_sycl_queue.py::test_2in_1out[opencl:gpu:0-power-data113-data213] -tests/test_sycl_queue.py::test_2in_1out[level_zero:gpu:0-power-data113-data213] -tests/test_sycl_queue.py::test_out_2in_1out[opencl:gpu:0-power-data19-data29] -tests/test_sycl_queue.py::test_out_2in_1out[level_zero:gpu:0-power-data19-data29] tests/test_sycl_queue.py::test_eig[opencl:gpu:0] tests/test_sycl_queue.py::test_eig[level_zero:gpu:0] tests/test_sycl_queue.py::test_eigh[opencl:gpu:0] @@ -459,8 +92,6 @@ tests/test_sycl_queue.py::test_to_device[opencl:gpu:0-opencl:cpu:0] tests/test_sycl_queue.py::test_to_device[level_zero:gpu:0-opencl:cpu:0] tests/test_umath.py::test_umaths[('floor_divide', 'ff')] -tests/test_umath.py::test_umaths[('power', 'ii')] -tests/test_umath.py::test_umaths[('power', 'll')] tests/test_umath.py::TestExp::test_exp tests/test_umath.py::TestExp::test_invalid_dtype[numpy.float32] @@ -880,117 +511,6 @@ tests/third_party/cupy/logic_tests/test_content.py::TestContent::test_isnan tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticUnary_param_29_{arg1=2.0, name='reciprocal'}::test_unary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_6_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[0., 1., 2.], [3., 4., 5.]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_10_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[0, 1, 2], [3, 4, 5]], dtype=int32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_10_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[0, 1, 2], [3, 4, 5]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_10_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[6, 5, 4], [3, 2, 1]], dtype=int32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_10_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[6, 5, 4], [3, 2, 1]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_14_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[0, 1, 2], [3, 4, 5]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_14_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[0, 1, 2], [3, 4, 5]], dtype=int64), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_14_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[6, 5, 4], [3, 2, 1]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_14_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[6, 5, 4], [3, 2, 1]], dtype=int64), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_38_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[0., 1., 2.], [3., 4., 5.]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_42_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[0, 1, 2], [3, 4, 5]], dtype=int32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_42_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[0, 1, 2], [3, 4, 5]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_42_{arg1=array([[1., 2., 3.], [4., 5., 6.]]), arg2=array([[6, 5, 4], [3, 2, 1]], dtype=int32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_42_{arg1=array([[1., 2., 3.], [4., 5., 6.]]), arg2=array([[6, 5, 4], [3, 2, 1]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_46_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[0, 1, 2], [3, 4, 5]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_46_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[0, 1, 2], [3, 4, 5]], dtype=int64), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_46_{arg1=array([[1., 2., 3.], [4., 5., 6.]]), arg2=array([[6, 5, 4], [3, 2, 1]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_46_{arg1=array([[1., 2., 3.], [4., 5., 6.]]), arg2=array([[6, 5, 4], [3, 2, 1]], dtype=int64), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_66_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int32), arg2=array([[0., 1., 2.], [3., 4., 5.]], dtype=float32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_66_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[0., 1., 2.], [3., 4., 5.]], dtype=float32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_66_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int32), arg2=array([[6., 5., 4.], [3., 2., 1.]], dtype=float32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_66_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[6., 5., 4.], [3., 2., 1.]], dtype=float32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_70_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int32), arg2=array([[0., 1., 2.], [3., 4., 5.]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_70_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[0., 1., 2.], [3., 4., 5.]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_70_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int32), arg2=array([[6., 5., 4.], [3., 2., 1.]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_70_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[6., 5., 4.], [3., 2., 1.]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_74_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int32), arg2=array([[0, 1, 2], [3, 4, 5]], dtype=int32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_74_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[0, 1, 2], [3, 4, 5]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_74_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int32), arg2=array([[6, 5, 4], [3, 2, 1]], dtype=int32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_74_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[6, 5, 4], [3, 2, 1]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_78_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int32), arg2=array([[0, 1, 2], [3, 4, 5]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_78_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[0, 1, 2], [3, 4, 5]], dtype=int64), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_78_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int32), arg2=array([[6, 5, 4], [3, 2, 1]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_78_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[6, 5, 4], [3, 2, 1]], dtype=int64), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_82_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int32), arg2=0, name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_82_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=0, name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_86_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int32), arg2=0.0, name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_90_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int32), arg2=2, name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_90_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=2, name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_94_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int32), arg2=2.0, name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_98_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[0., 1., 2.], [3., 4., 5.]], dtype=float32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_98_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int64), arg2=array([[0., 1., 2.], [3., 4., 5.]], dtype=float32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_98_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[6., 5., 4.], [3., 2., 1.]], dtype=float32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_98_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int64), arg2=array([[6., 5., 4.], [3., 2., 1.]], dtype=float32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_102_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[0., 1., 2.], [3., 4., 5.]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_102_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int64), arg2=array([[0., 1., 2.], [3., 4., 5.]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_102_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[6., 5., 4.], [3., 2., 1.]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_102_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int64), arg2=array([[6., 5., 4.], [3., 2., 1.]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_106_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[0, 1, 2], [3, 4, 5]], dtype=int32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_106_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int64), arg2=array([[0, 1, 2], [3, 4, 5]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_106_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[6, 5, 4], [3, 2, 1]], dtype=int32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_106_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int64), arg2=array([[6, 5, 4], [3, 2, 1]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_110_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[0, 1, 2], [3, 4, 5]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_110_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int64), arg2=array([[0, 1, 2], [3, 4, 5]], dtype=int64), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_110_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=array([[6, 5, 4], [3, 2, 1]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_110_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int64), arg2=array([[6, 5, 4], [3, 2, 1]], dtype=int64), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_114_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=0, name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_114_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int64), arg2=0, name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_118_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=0.0, name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_122_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=2, name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_122_{arg1=array([[1, 2, 3], [4, 5, 6]], dtype=int64), arg2=2, name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_126_{arg1=array([[1, 2, 3], [4, 5, 6]]), arg2=2.0, name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_134_{arg1=0, arg2=array([[0., 1., 2.], [3., 4., 5.]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_138_{arg1=0, arg2=array([[0, 1, 2], [3, 4, 5]], dtype=int32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_138_{arg1=0, arg2=array([[0, 1, 2], [3, 4, 5]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_138_{arg1=0, arg2=array([[6, 5, 4], [3, 2, 1]], dtype=int32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_138_{arg1=0, arg2=array([[6, 5, 4], [3, 2, 1]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_142_{arg1=0, arg2=array([[0, 1, 2], [3, 4, 5]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_142_{arg1=0, arg2=array([[0, 1, 2], [3, 4, 5]], dtype=int64), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_142_{arg1=0, arg2=array([[6, 5, 4], [3, 2, 1]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_142_{arg1=0, arg2=array([[6, 5, 4], [3, 2, 1]], dtype=int64), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_166_{arg1=0.0, arg2=array([[0., 1., 2.], [3., 4., 5.]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_170_{arg1=0.0, arg2=array([[0, 1, 2], [3, 4, 5]], dtype=int32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_174_{arg1=0.0, arg2=array([[0, 1, 2], [3, 4, 5]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_198_{arg1=2, arg2=array([[0., 1., 2.], [3., 4., 5.]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_202_{arg1=2, arg2=array([[0, 1, 2], [3, 4, 5]], dtype=int32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_202_{arg1=2, arg2=array([[0, 1, 2], [3, 4, 5]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_202_{arg1=2, arg2=array([[6, 5, 4], [3, 2, 1]], dtype=int32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_202_{arg1=2, arg2=array([[6, 5, 4], [3, 2, 1]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_206_{arg1=2, arg2=array([[0, 1, 2], [3, 4, 5]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_206_{arg1=2, arg2=array([[0, 1, 2], [3, 4, 5]], dtype=int64), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_206_{arg1=2, arg2=array([[6, 5, 4], [3, 2, 1]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_206_{arg1=2, arg2=array([[6, 5, 4], [3, 2, 1]], dtype=int64), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_230_{arg1=2.0, arg2=array([[0., 1., 2.], [3., 4., 5.]]), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_234_{arg1=2.0, arg2=array([[0, 1, 2], [3, 4, 5]], dtype=int32), name='power'}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary_param_238_{arg1=2.0, arg2=array([[0, 1, 2], [3, 4, 5]]), name='power'}::test_binary - -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_128_{arg1=array([-3., -2., -1., 1., 2., 3.], dtype=float32), arg2=array([-3., -2., -1., 1., 2., 3.], dtype=float32), dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_134_{arg1=array([-3., -2., -1., 1., 2., 3.], dtype=float32), arg2=array([-3., -2., -1., 1., 2., 3.]), dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_135_{arg1=array([-3., -2., -1., 1., 2., 3.], dtype=float32), arg2=array([-3., -2., -1., 1., 2., 3.]), dtype=float64, name='power', use_dtype=False}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_140_{arg1=array([-3., -2., -1., 1., 2., 3.], dtype=float32), arg2=0.0, dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_146_{arg1=array([-3., -2., -1., 1., 2., 3.], dtype=float32), arg2=2.0, dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_152_{arg1=array([-3., -2., -1., 1., 2., 3.], dtype=float32), arg2=-2.0, dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_158_{arg1=array([-3., -2., -1., 1., 2., 3.]), arg2=array([-3., -2., -1., 1., 2., 3.], dtype=float32), dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_159_{arg1=array([-3., -2., -1., 1., 2., 3.]), arg2=array([-3., -2., -1., 1., 2., 3.], dtype=float32), dtype=float64, name='power', use_dtype=False}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_164_{arg1=array([-3., -2., -1., 1., 2., 3.]), arg2=array([-3., -2., -1., 1., 2., 3.]), dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_165_{arg1=array([-3., -2., -1., 1., 2., 3.]), arg2=array([-3., -2., -1., 1., 2., 3.]), dtype=float64, name='power', use_dtype=False}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_170_{arg1=array([-3., -2., -1., 1., 2., 3.]), arg2=0.0, dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_171_{arg1=array([-3., -2., -1., 1., 2., 3.]), arg2=0.0, dtype=float64, name='power', use_dtype=False}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_176_{arg1=array([-3., -2., -1., 1., 2., 3.]), arg2=2.0, dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_177_{arg1=array([-3., -2., -1., 1., 2., 3.]), arg2=2.0, dtype=float64, name='power', use_dtype=False}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_183_{arg1=array([-3., -2., -1., 1., 2., 3.]), arg2=-2.0, dtype=float64, name='power', use_dtype=False}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_188_{arg1=0.0, arg2=array([-3., -2., -1., 1., 2., 3.], dtype=float32), dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_194_{arg1=0.0, arg2=array([-3., -2., -1., 1., 2., 3.]), dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_195_{arg1=0.0, arg2=array([-3., -2., -1., 1., 2., 3.]), dtype=float64, name='power', use_dtype=False}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_218_{arg1=2.0, arg2=array([-3., -2., -1., 1., 2., 3.], dtype=float32), dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_224_{arg1=2.0, arg2=array([-3., -2., -1., 1., 2., 3.]), dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_225_{arg1=2.0, arg2=array([-3., -2., -1., 1., 2., 3.]), dtype=float64, name='power', use_dtype=False}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_248_{arg1=-2.0, arg2=array([-3., -2., -1., 1., 2., 3.], dtype=float32), dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_254_{arg1=-2.0, arg2=array([-3., -2., -1., 1., 2., 3.]), dtype=float64, name='power', use_dtype=True}::test_binary -tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_255_{arg1=-2.0, arg2=array([-3., -2., -1., 1., 2., 3.]), dtype=float64, name='power', use_dtype=False}::test_binary tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_280_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[0., 1., 2.], [3., 4., 5.]], dtype=float32), dtype=float64, name='fmod', use_dtype=True}::test_binary tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_288_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[0., 1., 2.], [3., 4., 5.]]), dtype=float64, name='fmod', use_dtype=True}::test_binary tests/third_party/cupy/math_tests/test_arithmetic.py::TestArithmeticBinary2_param_289_{arg1=array([[1., 2., 3.], [4., 5., 6.]], dtype=float32), arg2=array([[0., 1., 2.], [3., 4., 5.]]), dtype=float64, name='fmod', use_dtype=False}::test_binary diff --git a/tests/test_mathematical.py b/tests/test_mathematical.py index 65af3d50cf42..cac1e3385c21 100644 --- a/tests/test_mathematical.py +++ b/tests/test_mathematical.py @@ -15,7 +15,6 @@ from .helper import ( get_all_dtypes, get_complex_dtypes, - get_float_complex_dtypes, get_float_dtypes, has_support_aspect64, is_cpu_device, @@ -276,14 +275,23 @@ def test_op_with_scalar(array, val, func, data_type, val_type): val_ = val_type(val) if func == "power": - if val_ == 0 and numpy.issubdtype(data_type, numpy.complexfloating): + if ( + val_ == 0 + and numpy.issubdtype(data_type, numpy.complexfloating) + and not dpnp.all(dpnp_a) + ): pytest.skip( "(0j ** 0) is different: (NaN + NaNj) in dpnp and (1 + 0j) in numpy" ) - elif is_cpu_device() and data_type == dpnp.complex128: - # TODO: discuss the bahavior with OneMKL team + # TODO: Remove when #1378 (dpctl) is solved + elif ( + is_cpu_device() + and dpnp_a.dtype == dpnp.complex128 + and dpnp_a.size >= 8 + and not dpnp.all(dpnp_a) + ): pytest.skip( - "(0j ** 5) is different: (NaN + NaNj) in dpnp and (0j) in numpy" + "[..., 0j ** val] is different for x.size >= 8: [..., NaN + NaNj] in dpnp and [..., 0 + 0j] in numpy" ) if func == "subtract" and val_type == bool and data_type == dpnp.bool: @@ -513,10 +521,17 @@ def test_power(array, val, data_type, val_type): dpnp_a = dpnp.array(array, dtype=data_type) val_ = val_type(val) - if is_cpu_device() and dpnp.complex128 in (data_type, val_type): - # TODO: discuss the behavior with OneMKL team + # TODO: Remove when #1378 (dpctl) is solved + if ( + is_cpu_device() + and ( + dpnp.complex128 in (data_type, val_type) + or dpnp.complex64 in (data_type, val_type) + ) + and dpnp_a.size >= 8 + ): pytest.skip( - "(0j ** 5) is different: (NaN + NaNj) in dpnp and (0j) in numpy" + "[..., 0j ** val] is different for x.size >= 8: [..., NaN + NaNj] in dpnp and [..., 0 + 0j] in numpy" ) result = dpnp.power(dpnp_a, val_) @@ -991,7 +1006,9 @@ def test_invalid_out(self, out): class TestPower: - @pytest.mark.parametrize("dtype", get_float_complex_dtypes()) + @pytest.mark.parametrize( + "dtype", get_all_dtypes(no_bool=True, no_none=True) + ) def test_power(self, dtype): array1_data = numpy.arange(10) array2_data = numpy.arange(5, 15) @@ -1008,11 +1025,9 @@ def test_power(self, dtype): np_array2 = numpy.array(array2_data, dtype=dtype) expected = numpy.power(np_array1, np_array2, out=out) - assert_allclose(expected, result) + assert_allclose(expected, result, rtol=1e-06) - @pytest.mark.parametrize( - "dtype", get_all_dtypes(no_complex=True, no_none=True) - ) + @pytest.mark.parametrize("dtype", get_all_dtypes(no_none=True)) def test_out_dtypes(self, dtype): size = 2 if dtype == dpnp.bool else 5 @@ -1024,27 +1039,37 @@ def test_out_dtypes(self, dtype): dp_array1 = dpnp.arange(size, 2 * size, dtype=dtype) dp_array2 = dpnp.arange(size, dtype=dtype) dp_out = dpnp.empty(size, dtype=dpnp.complex64) - result = dpnp.power(dp_array1, dp_array2, out=dp_out) + if dtype != dpnp.complex64: + # dtype of out mismatches types of input arrays + with pytest.raises(TypeError): + dpnp.power(dp_array1, dp_array2, out=dp_out) - assert_array_equal(expected, result) + # allocate new out with expected type + if dtype == dpnp.bool: + out_dtype = numpy.int8 + else: + out_dtype = dtype + dp_out = dpnp.empty(size, dtype=out_dtype) - @pytest.mark.parametrize( - "dtype", get_all_dtypes(no_bool=True, no_complex=True, no_none=True) - ) + result = dpnp.power(dp_array1, dp_array2, out=dp_out) + assert_allclose(expected, result, rtol=1e-06) + + @pytest.mark.parametrize("dtype", get_all_dtypes(no_bool=True)) def test_out_overlap(self, dtype): - size = 5 + size = 10 + # DPNP + dp_a = dpnp.arange(2 * size, dtype=dtype) + dpnp.power(dp_a[size::], dp_a[::2], out=dp_a[:size:]), + # original np_a = numpy.arange(2 * size, dtype=dtype) - expected = numpy.power(np_a[size::], np_a[::2], out=np_a[:size:]) - - dp_a = dpnp.arange(2 * size, dtype=dtype) - result = dpnp.power(dp_a[size::], dp_a[::2], out=dp_a[:size:]) + numpy.power(np_a[size::], np_a[::2], out=np_a[:size:]) - assert_allclose(expected, result) - assert_allclose(dp_a, np_a) + rtol = 1e-05 if dtype is dpnp.complex64 else 1e-07 + assert_allclose(np_a, dp_a, rtol=rtol) @pytest.mark.parametrize( - "dtype", get_all_dtypes(no_bool=True, no_complex=True, no_none=True) + "dtype", get_all_dtypes(no_bool=True, no_none=True) ) def test_inplace_strided_out(self, dtype): size = 5 @@ -1061,9 +1086,9 @@ def test_inplace_strided_out(self, dtype): "shape", [(0,), (15,), (2, 2)], ids=["(0,)", "(15, )", "(2,2)"] ) def test_invalid_shape(self, shape): - dp_array1 = dpnp.arange(10, dtype=dpnp.float64) - dp_array2 = dpnp.arange(5, 15, dtype=dpnp.float64) - dp_out = dpnp.empty(shape, dtype=dpnp.float64) + dp_array1 = dpnp.arange(10, dtype=dpnp.float32) + dp_array2 = dpnp.arange(5, 15, dtype=dpnp.float32) + dp_out = dpnp.empty(shape, dtype=dpnp.float32) with pytest.raises(ValueError): dpnp.power(dp_array1, dp_array2, out=dp_out) @@ -1098,19 +1123,24 @@ def test_complex_values(self): def test_integer_power_of_0_or_1(self, val, dtype): np_arr = numpy.arange(10, dtype=dtype) dp_arr = dpnp.array(np_arr) - func = lambda x: 1**x + func = lambda x: val**x assert_equal(func(np_arr), func(dp_arr)) @pytest.mark.parametrize("dtype", [dpnp.int32, dpnp.int64]) def test_integer_to_negative_power(self, dtype): - ones = dpnp.ones(10, dtype=dtype) a = dpnp.arange(2, 10, dtype=dtype) - b = dpnp.full(10, -2, dtype=dtype) - - assert_array_equal(ones ** (-2), ones) - assert_equal(a ** (-3), 0) # positive integer to negative integer power - assert_equal(b ** (-4), 0) # negative integer to negative integer power + b = dpnp.full(8, -2, dtype=dtype) + zeros = dpnp.zeros(8, dtype=dtype) + ones = dpnp.ones(8, dtype=dtype) + + assert_array_equal(ones ** (-2), zeros) + assert_equal( + a ** (-3), zeros + ) # positive integer to negative integer power + assert_equal( + b ** (-4), zeros + ) # negative integer to negative integer power def test_float_to_inf(self): a = numpy.array( diff --git a/tests/test_strides.py b/tests/test_strides.py index e39414a7bd7f..4215e77e8cac 100644 --- a/tests/test_strides.py +++ b/tests/test_strides.py @@ -277,8 +277,8 @@ def test_strided_out_2args(func_name, dtype): np_res = _getattr(numpy, func_name)(np_a, np_b, out=np_out) dp_res = _getattr(dpnp, func_name)(dp_a, dp_b, out=dp_out) - assert_allclose(dp_res.asnumpy(), np_res) - assert_allclose(dp_out.asnumpy(), np_out) + assert_allclose(dp_res.asnumpy(), np_res, rtol=1e-06) + assert_allclose(dp_out.asnumpy(), np_out, rtol=1e-06) @pytest.mark.parametrize("func_name", ["add", "multiply", "power", "subtract"]) diff --git a/tests/test_sycl_queue.py b/tests/test_sycl_queue.py index fca7298f0e58..aaa7b3bae8e9 100644 --- a/tests/test_sycl_queue.py +++ b/tests/test_sycl_queue.py @@ -373,7 +373,7 @@ def test_2in_1out(func, data1, data2, device): x2 = dpnp.array(data2, device=device) result = getattr(dpnp, func)(x1, x2) - assert_array_equal(result, expected) + assert_allclose(result, expected) assert_sycl_queue_equal(result.sycl_queue, x1.sycl_queue) assert_sycl_queue_equal(result.sycl_queue, x2.sycl_queue) @@ -638,7 +638,7 @@ def test_out_2in_1out(func, data1, data2, device): result = dpnp.empty_like(dp_out) getattr(dpnp, func)(x1, x2, out=result) - assert_array_equal(result, expected) + assert_allclose(result, expected) assert_sycl_queue_equal(result.sycl_queue, x1.sycl_queue) assert_sycl_queue_equal(result.sycl_queue, x2.sycl_queue) diff --git a/tests/third_party/cupy/creation_tests/test_from_data.py b/tests/third_party/cupy/creation_tests/test_from_data.py index ae29f393e9dc..a517a2cb2a10 100644 --- a/tests/third_party/cupy/creation_tests/test_from_data.py +++ b/tests/third_party/cupy/creation_tests/test_from_data.py @@ -501,6 +501,9 @@ def test_asarray_from_big_endian(self, xp, dtype): # happens to work before the change in #5828 return b + b + @pytest.mark.skip( + "TODO: remove once dpctl gh-1376 is merged to gold branch" + ) @testing.for_CF_orders() @testing.for_all_dtypes() @testing.numpy_cupy_array_equal() diff --git a/tests/third_party/cupy/math_tests/test_arithmetic.py b/tests/third_party/cupy/math_tests/test_arithmetic.py index 6f20056b722c..c70c37e48a29 100644 --- a/tests/third_party/cupy/math_tests/test_arithmetic.py +++ b/tests/third_party/cupy/math_tests/test_arithmetic.py @@ -9,7 +9,7 @@ from tests.helper import has_support_aspect64 from tests.third_party.cupy import testing -float_types = [numpy.float32, numpy.float64] +float_types = list(testing.helper._float_dtypes) complex_types = [] signed_int_types = [numpy.int32, numpy.int64] unsigned_int_types = [] @@ -135,20 +135,6 @@ def check_binary(self, xp): dtype1 = np1.dtype dtype2 = np2.dtype - if self.name == "power": - # TODO(niboshi): Fix this: power(0, 1j) - # numpy => 1+0j - # cupy => 0j - if dtype2 in complex_types and (np1 == 0).any(): - return xp.array(True) - - # TODO(niboshi): Fix this: xp.power(0j, 0) - # numpy => 1+0j - # cupy => 0j - c_arg1 = dtype1 in complex_types - if c_arg1 and (np1 == 0j).any() and (np2 == 0).any(): - return xp.array(True) - # TODO(niboshi): Fix this: xp.add(0j, xp.array([2.], 'f')).dtype # numpy => complex64 # cupy => complex128 @@ -186,36 +172,13 @@ def check_binary(self, xp): y = y.astype(numpy.complex64) # NumPy returns an output array of another type than DPNP when input ones have diffrent types. - if xp is cupy and dtype1 != dtype2 and not self.use_dtype: + if xp is numpy and dtype1 != dtype2: is_array_arg1 = not xp.isscalar(arg1) is_array_arg2 = not xp.isscalar(arg2) is_int_float = lambda _x, _y: numpy.issubdtype( _x, numpy.integer ) and numpy.issubdtype(_y, numpy.floating) - is_same_type = lambda _x, _y, _type: numpy.issubdtype( - _x, _type - ) and numpy.issubdtype(_y, _type) - - if self.name == "power": - if is_array_arg1 and is_array_arg2: - # If both inputs are arrays where one is of floating type and another - integer, - # NumPy will return an output array of always "float64" type, - # while DPNP will return the array of a wider type from the input arrays. - if is_int_float(dtype1, dtype2) or is_int_float( - dtype2, dtype1 - ): - y = y.astype(numpy.float64) - elif is_same_type( - dtype1, dtype2, numpy.floating - ) or is_same_type(dtype1, dtype2, numpy.integer): - # If one input is an array and another - scalar, - # NumPy will return an output array of the same type as the inpupt array has, - # while DPNP will return the array of a wider type from the inputs (considering both array and scalar). - if is_array_arg1 and not is_array_arg2: - y = y.astype(dtype1) - elif is_array_arg2 and not is_array_arg1: - y = y.astype(dtype2) return y diff --git a/tests/third_party/cupy/testing/helper.py b/tests/third_party/cupy/testing/helper.py index 859356ebb59b..9cf8403cdf2d 100644 --- a/tests/third_party/cupy/testing/helper.py +++ b/tests/third_party/cupy/testing/helper.py @@ -1007,7 +1007,7 @@ def test_func(*args, **kw): for dtype in dtypes: if ( numpy.dtype(dtype).type in (numpy.float64, numpy.complex128) - and not select_default_device().has_aspect_fp64 + and not has_support_aspect64() ): continue @@ -1031,15 +1031,19 @@ def test_func(*args, **kw): return decorator +def has_support_aspect64(): + return select_default_device().has_aspect_fp64 + + def _get_supported_float_dtypes(): - if select_default_device().has_aspect_fp64: + if has_support_aspect64(): return (numpy.float64, numpy.float32) else: return (numpy.float32,) def _get_supported_complex_dtypes(): - if select_default_device().has_aspect_fp64: + if has_support_aspect64(): return (numpy.complex128, numpy.complex64) else: return (numpy.complex64,)