diff --git a/doc/docstring_template.py b/doc/docstring_template.py index a31bb2505769..60a83c181a65 100644 --- a/doc/docstring_template.py +++ b/doc/docstring_template.py @@ -78,7 +78,7 @@ def func(a, b=None, c=True): ----------- Some limitations in comparison to baseline, ex: Input array data types are limited by supported DPNP :ref:`Data types`. - Parameter ``c`` is supported only with default value ``True``. + Parameter `c` is supported only with default value ``True``. Otherwise the function will be executed sequentially on CPU. See Also diff --git a/dpnp/backend/cmake/Modules/MKLConfig.cmake b/dpnp/backend/cmake/Modules/MKLConfig.cmake index 07290e8ea331..fa6f80a19b61 100644 --- a/dpnp/backend/cmake/Modules/MKLConfig.cmake +++ b/dpnp/backend/cmake/Modules/MKLConfig.cmake @@ -414,7 +414,7 @@ if(GNU_C_COMPILER OR GNU_Fortran_COMPILER) endif() endif() -# Additonal compiler & linker options +# Additional compiler & linker options if(CXX_COMPILER_NAME STREQUAL "icpx" OR CXX_COMPILER_NAME STREQUAL "icx.exe") list(APPEND MKL_DPCPP_COPT "-fsycl") list(APPEND MKL_DPCPP_LOPT "-fsycl") diff --git a/dpnp/backend/examples/example8.cpp b/dpnp/backend/examples/example8.cpp index af342614c305..ffc18a99f422 100644 --- a/dpnp/backend/examples/example8.cpp +++ b/dpnp/backend/examples/example8.cpp @@ -56,7 +56,7 @@ int main(int, char **) dpnp_argsort_c(array, result, size); - std::cout << "array with 'sorted' indeces" << std::endl; + std::cout << "array with 'sorted' indices" << std::endl; for (size_t i = 0; i < size; ++i) { std::cout << result[i] << ", "; } diff --git a/dpnp/backend/extensions/lapack/heevd.cpp b/dpnp/backend/extensions/lapack/heevd.cpp index d8ca71f7aae6..e57d34f10c04 100644 --- a/dpnp/backend/extensions/lapack/heevd.cpp +++ b/dpnp/backend/extensions/lapack/heevd.cpp @@ -114,7 +114,7 @@ static sycl::event heevd_impl(sycl::queue exec_q, info = -1; } - if (info != 0) // an unexected error occurs + if (info != 0) // an unexpected error occurs { if (scratchpad != nullptr) { sycl::free(scratchpad, exec_q); @@ -188,8 +188,9 @@ std::pair bool is_eig_vecs_f_contig = eig_vecs.is_f_contiguous(); bool is_eig_vals_c_contig = eig_vals.is_c_contiguous(); if (!is_eig_vecs_f_contig) { - throw py::value_error("An array with input matrix / ouput eigenvectors " - "must be F-contiguous"); + throw py::value_error( + "An array with input matrix / output eigenvectors " + "must be F-contiguous"); } else if (!is_eig_vals_c_contig) { throw py::value_error( diff --git a/dpnp/backend/extensions/lapack/syevd.cpp b/dpnp/backend/extensions/lapack/syevd.cpp index b9b700184f8a..11c13569bf6a 100644 --- a/dpnp/backend/extensions/lapack/syevd.cpp +++ b/dpnp/backend/extensions/lapack/syevd.cpp @@ -112,7 +112,7 @@ static sycl::event syevd_impl(sycl::queue exec_q, info = -1; } - if (info != 0) // an unexected error occurs + if (info != 0) // an unexpected error occurs { if (scratchpad != nullptr) { sycl::free(scratchpad, exec_q); @@ -186,8 +186,9 @@ std::pair bool is_eig_vecs_f_contig = eig_vecs.is_f_contiguous(); bool is_eig_vals_c_contig = eig_vals.is_c_contiguous(); if (!is_eig_vecs_f_contig) { - throw py::value_error("An array with input matrix / ouput eigenvectors " - "must be F-contiguous"); + throw py::value_error( + "An array with input matrix / output eigenvectors " + "must be F-contiguous"); } else if (!is_eig_vals_c_contig) { throw py::value_error( @@ -202,7 +203,7 @@ std::pair if (eig_vecs_type_id != eig_vals_type_id) { throw py::value_error( - "Types of eigenvectors and eigenvalues are missmatched"); + "Types of eigenvectors and eigenvalues are mismatched"); } syevd_impl_fn_ptr_t syevd_fn = syevd_dispatch_vector[eig_vecs_type_id]; diff --git a/dpnp/backend/extensions/sycl_ext/dispatcher_utils.hpp b/dpnp/backend/extensions/sycl_ext/dispatcher_utils.hpp index 57f1a4e43a09..f04472e9c18d 100644 --- a/dpnp/backend/extensions/sycl_ext/dispatcher_utils.hpp +++ b/dpnp/backend/extensions/sycl_ext/dispatcher_utils.hpp @@ -388,8 +388,8 @@ struct CartesianDispatcher FnT operator()(std::initializer_list values) { - // though std::initializer_list::size is constexpr it doesnt work for - // some reson constexpr auto const list_size = values.size(); + // though std::initializer_list::size is constexpr it doesn't work for + // some reason constexpr auto const list_size = values.size(); std::array idx; bool found = coord_in_space>::get( diff --git a/dpnp/backend/extensions/sycl_ext/sum_mean.hpp b/dpnp/backend/extensions/sycl_ext/sum_mean.hpp index a37799015010..69e85eed8840 100644 --- a/dpnp/backend/extensions/sycl_ext/sum_mean.hpp +++ b/dpnp/backend/extensions/sycl_ext/sum_mean.hpp @@ -61,7 +61,7 @@ bool check_limitations(const dpctl::tensor::usm_ndarray &in, size_t out_full_size = out.get_size() * out.get_elemsize(); if (out_full_size > local_mem_size) { if (throw_on_fail) - throw py::value_error("Resulting array exceeds local memroy size" + + throw py::value_error("Resulting array exceeds local memory size" + std::to_string(local_mem_size)); return false; diff --git a/dpnp/backend/extensions/vm/common.hpp b/dpnp/backend/extensions/vm/common.hpp index db68df60967b..30e8c12309b3 100644 --- a/dpnp/backend/extensions/vm/common.hpp +++ b/dpnp/backend/extensions/vm/common.hpp @@ -124,15 +124,15 @@ std::pair return std::make_pair(sycl::event(), sycl::event()); } - // ensure that output is ample enough to accomodate all elements + // ensure that output is ample enough to accommodate all elements auto dst_offsets = dst.get_minmax_offsets(); - // destination must be ample enough to accomodate all elements + // destination must be ample enough to accommodate all elements { size_t range = static_cast(dst_offsets.second - dst_offsets.first); if (range + 1 < src_nelems) { throw py::value_error( - "Destination array can not accomodate all the elements " + "Destination array can not accommodate all the elements " "of source array."); } } @@ -225,15 +225,15 @@ std::pair binary_ufunc( return std::make_pair(sycl::event(), sycl::event()); } - // ensure that output is ample enough to accomodate all elements + // ensure that output is ample enough to accommodate all elements auto dst_offsets = dst.get_minmax_offsets(); - // destination must be ample enough to accomodate all elements + // destination must be ample enough to accommodate all elements { size_t range = static_cast(dst_offsets.second - dst_offsets.first); if (range + 1 < src_nelems) { throw py::value_error( - "Destination array can not accomodate all the " + "Destination array can not accommodate all the " "elements of source array."); } } @@ -329,9 +329,9 @@ bool need_to_call_unary_ufunc(sycl::queue exec_q, return false; } - // ensure that output is ample enough to accomodate all elements + // ensure that output is ample enough to accommodate all elements auto dst_offsets = dst.get_minmax_offsets(); - // destination must be ample enough to accomodate all elements + // destination must be ample enough to accommodate all elements { size_t range = static_cast(dst_offsets.second - dst_offsets.first); @@ -346,7 +346,7 @@ bool need_to_call_unary_ufunc(sycl::queue exec_q, return false; } - // suppport only contiguous inputs + // support only contiguous inputs bool is_src_c_contig = src.is_c_contiguous(); bool is_dst_c_contig = dst.is_c_contiguous(); @@ -425,9 +425,9 @@ bool need_to_call_binary_ufunc(sycl::queue exec_q, return false; } - // ensure that output is ample enough to accomodate all elements + // ensure that output is ample enough to accommodate all elements auto dst_offsets = dst.get_minmax_offsets(); - // destination must be ample enough to accomodate all elements + // destination must be ample enough to accommodate all elements { size_t range = static_cast(dst_offsets.second - dst_offsets.first); @@ -442,7 +442,7 @@ bool need_to_call_binary_ufunc(sycl::queue exec_q, return false; } - // suppport only contiguous inputs + // support only contiguous inputs bool is_src1_c_contig = src1.is_c_contiguous(); bool is_src2_c_contig = src2.is_c_contiguous(); bool is_dst_c_contig = dst.is_c_contiguous(); diff --git a/dpnp/backend/include/dpnp_iface.hpp b/dpnp/backend/include/dpnp_iface.hpp index 994fa05a0126..0cbcfab9f962 100644 --- a/dpnp/backend/include/dpnp_iface.hpp +++ b/dpnp/backend/include/dpnp_iface.hpp @@ -1015,7 +1015,7 @@ INP_DLLEXPORT void * * @param [in] q_ref Reference to SYCL queue. * @param [in] array Input array with data. - * @param [out] result Output array with indeces. + * @param [out] result Output array with indices. * @param [in] size Number of elements in input arrays. * @param [in] dep_event_vec_ref Reference to vector of SYCL events. */ @@ -1069,7 +1069,7 @@ INP_DLLEXPORT void dpnp_searchsorted_c(void *result, * * @param [in] q_ref Reference to SYCL queue. * @param [in] array Input array with data. - * @param [out] result Output array with indeces. + * @param [out] result Output array with indices. * @param [in] size Number of elements in input arrays. * @param [in] dep_event_vec_ref Reference to vector of SYCL events. */ @@ -1564,7 +1564,7 @@ INP_DLLEXPORT void dpnp_min_c(void *array, * * @param [in] q_ref Reference to SYCL queue. * @param [in] array Input array with data. - * @param [out] result Output array with indeces. + * @param [out] result Output array with indices. * @param [in] size Number of elements in input array. * @param [in] dep_event_vec_ref Reference to vector of SYCL events. */ @@ -1585,7 +1585,7 @@ INP_DLLEXPORT void dpnp_argmax_c(void *array, void *result, size_t size); * * @param [in] q_ref Reference to SYCL queue. * @param [in] array Input array with data. - * @param [out] result Output array with indeces. + * @param [out] result Output array with indices. * @param [in] size Number of elements in input array. * @param [in] dep_event_vec_ref Reference to vector of SYCL events. */ @@ -1606,7 +1606,7 @@ INP_DLLEXPORT void dpnp_argmin_c(void *array, void *result, size_t size); * * @param [in] q_ref Reference to SYCL queue. * @param [in] input_in Input array with data. - * @param [out] result_out Output array with indeces. + * @param [out] result_out Output array with indices. * @param [in] input_size Number of elements in input arrays. * @param [in] decimals Number of decimal places to round. Support * only with default value 0. @@ -1633,7 +1633,7 @@ INP_DLLEXPORT void dpnp_around_c(const void *input_in, * * @param [in] q_ref Reference to SYCL queue. * @param [in] array Input array with data. - * @param [out] result Output array with indeces. + * @param [out] result Output array with indices. * @param [in] shape Shape of input array. * @param [in] ndim Number of elements in shape. * @param [in] axis Axis. @@ -1819,7 +1819,7 @@ INP_DLLEXPORT void dpnp_triu_c(void *array, * * @param [in] q_ref Reference to SYCL queue. * @param [in] array Input array with data. - * @param [out] result Output array with indeces. + * @param [out] result Output array with indices. * @param [in] shape Shape of input array. * @param [in] ndim Number of elements in shape. * @param [in] axis Axis. diff --git a/dpnp/backend/include/dpnp_iface_fptr.hpp b/dpnp/backend/include/dpnp_iface_fptr.hpp index 51f803275959..40a5eb669dd5 100644 --- a/dpnp/backend/include/dpnp_iface_fptr.hpp +++ b/dpnp/backend/include/dpnp_iface_fptr.hpp @@ -538,7 +538,7 @@ DPNPFuncData_t get_dpnp_function_ptr( * @ingroup BACKEND_API * @brief get runtime pointer to selected function * - * Same interface function as @ref get_dpnp_function_ptr with a bit diffrent + * Same interface function as @ref get_dpnp_function_ptr with a bit different * interface * * @param [out] result_type Type of the result provided by the backend API diff --git a/dpnp/backend/include/dpnp_iface_random.hpp b/dpnp/backend/include/dpnp_iface_random.hpp index 562e5ae34a28..10ba3a2e2820 100644 --- a/dpnp/backend/include/dpnp_iface_random.hpp +++ b/dpnp/backend/include/dpnp_iface_random.hpp @@ -205,7 +205,7 @@ INP_DLLEXPORT void dpnp_rng_gamma_c(void *result, /** * @ingroup BACKEND_RANDOM_API * @brief math library implementation of random number generator (gaussian - * continious distribution) + * continuous distribution) * * @param [in] q_ref Reference to SYCL queue. * @param [out] result Output array. @@ -431,7 +431,7 @@ INP_DLLEXPORT void dpnp_rng_multinomial_c(void *result, * @param [in] q_ref Reference to SYCL queue. * @param [out] result Output array. * @param [in] dimen Dimension of output random vectors. - * @param [in] mean_in Mean arry of dimension. + * @param [in] mean_in Mean array of dimension. * @param [in] mean_size Length of `mean_in`. * @param [in] cov Variance-covariance matrix. * @param [in] cov_size Length of `cov_in`. @@ -518,7 +518,7 @@ INP_DLLEXPORT void dpnp_rng_noncentral_chisquare_c(void *result, /** * @ingroup BACKEND_RANDOM_API * @brief math library implementation of random number generator (normal - * continious distribution) + * continuous distribution) * * @param [in] q_ref Reference to SYCL queue. * @param [out] result_out Output array. @@ -645,7 +645,7 @@ INP_DLLEXPORT void * @param [in] itemsize Length of `result` array element in bytes. * @param [in] ndim Number of array dimensions in `result` * arrays. - * @param [in] high_dim_size Number of elements in `result` arrays higer + * @param [in] high_dim_size Number of elements in `result` arrays higher * dimension, or len(result). * @param [in] size Number of elements in `result` arrays. * @param [in] dep_event_vec_ref Reference to vector of SYCL events. diff --git a/dpnp/backend/kernels/dpnp_krnl_bitwise.cpp b/dpnp/backend/kernels/dpnp_krnl_bitwise.cpp index 0134e94ef39d..4fdd1a394ed5 100644 --- a/dpnp/backend/kernels/dpnp_krnl_bitwise.cpp +++ b/dpnp/backend/kernels/dpnp_krnl_bitwise.cpp @@ -264,7 +264,7 @@ static void func_map_init_bitwise_1arg_1type(func_map_t &fmap) } \ \ /* memory transfer optimization, use USM-host for temporary speeds \ - * up tranfer to device */ \ + * up transfer to device */ \ using usm_host_allocatorT = \ sycl::usm_allocator; \ \ diff --git a/dpnp/backend/kernels/dpnp_krnl_common.cpp b/dpnp/backend/kernels/dpnp_krnl_common.cpp index dd6c8119c1b8..875c8ee6d1d0 100644 --- a/dpnp/backend/kernels/dpnp_krnl_common.cpp +++ b/dpnp/backend/kernels/dpnp_krnl_common.cpp @@ -322,7 +322,7 @@ DPCTLSyclEventRef dpnp_dot_c(DPCTLSyclQueueRef q_ref, // TODO: rewrite the condition in general case for ndims > 2 // (looks like there are such another cases) if (ext_input1_ndim == 2 && ext_input2_ndim == 2) { - // OneMKL gemm suports only arrays contiguous on inner dimension, + // OneMKL gemm supports only arrays contiguous on inner dimension, // so stride for at least one dimension should be equal to 1 if ((ext_input1_strides[0] == 1 || ext_input1_strides[1] == 1) && (ext_input2_strides[0] == 1 || ext_input2_strides[1] == 1) && @@ -392,7 +392,7 @@ DPCTLSyclEventRef dpnp_dot_c(DPCTLSyclQueueRef q_ref, info = -1; } - if (info != 0) // an unexected error occurs + if (info != 0) // an unexpected error occurs { throw std::runtime_error(error_msg.str()); } diff --git a/dpnp/backend/kernels/dpnp_krnl_elemwise.cpp b/dpnp/backend/kernels/dpnp_krnl_elemwise.cpp index 6a459d01ca54..dc87dc454900 100644 --- a/dpnp/backend/kernels/dpnp_krnl_elemwise.cpp +++ b/dpnp/backend/kernels/dpnp_krnl_elemwise.cpp @@ -92,7 +92,7 @@ } \ \ /* memory transfer optimization, use USM-host for temporary speeds \ - * up tranfer to device */ \ + * up transfer to device */ \ using usm_host_allocatorT = \ sycl::usm_allocator; \ \ @@ -754,7 +754,7 @@ constexpr auto dispatch_fmod_op(T elem1, T elem2) } \ \ /* memory transfer optimization, use USM-host for temporary speeds \ - * up tranfer to device */ \ + * up transfer to device */ \ using usm_host_allocatorT = \ sycl::usm_allocator; \ \ @@ -1146,7 +1146,7 @@ static void func_map_init_elemwise_1arg_1type(func_map_t &fmap) } \ \ /* memory transfer optimization, use USM-host for temporary speeds \ - * up tranfer to device */ \ + * up transfer to device */ \ using usm_host_allocatorT = \ sycl::usm_allocator; \ \ diff --git a/dpnp/backend/kernels/dpnp_krnl_logic.cpp b/dpnp/backend/kernels/dpnp_krnl_logic.cpp index 429f9d96f1ea..1974569e7fc4 100644 --- a/dpnp/backend/kernels/dpnp_krnl_logic.cpp +++ b/dpnp/backend/kernels/dpnp_krnl_logic.cpp @@ -197,7 +197,7 @@ static sycl::event dpnp_allclose(sycl::queue &q, } } - // casting integeral to floating type to avoid bad behavior + // casting integral to floating type to avoid bad behavior // on abs(MIN_INT), which leads to undefined result using _Arr2Type = std::conditional_t, _TolType, _DataType2>; @@ -525,7 +525,7 @@ DPCTLSyclEventRef (*dpnp_any_ext_c)(DPCTLSyclQueueRef, } \ \ /* memory transfer optimization, use USM-host for temporary speeds \ - * up tranfer to device */ \ + * up transfer to device */ \ using usm_host_allocatorT = \ sycl::usm_allocator; \ \ diff --git a/dpnp/backend/src/dpnp_fptr.hpp b/dpnp/backend/src/dpnp_fptr.hpp index d485711f8f52..459398f76117 100644 --- a/dpnp/backend/src/dpnp_fptr.hpp +++ b/dpnp/backend/src/dpnp_fptr.hpp @@ -98,7 +98,7 @@ struct func_type_map_factory_t : public Ps... }; /** - * A map of the FPTR interface to link Data type enum value with accociated C++ + * A map of the FPTR interface to link Data type enum value with associated C++ * type */ typedef func_type_map_factory_t< diff --git a/dpnp/backend/src/dpnp_iterator.hpp b/dpnp/backend/src/dpnp_iterator.hpp index e4bc041bdcda..399f27063839 100644 --- a/dpnp/backend/src/dpnp_iterator.hpp +++ b/dpnp/backend/src/dpnp_iterator.hpp @@ -40,7 +40,8 @@ * @ingroup BACKEND_UTILS * @brief Iterator for @ref DPNPC_id type * - * This type should be used to simplify data iteraton over input with parameters + * This type should be used to simplify data iteration over input with + * parameters * "[axis|axes]" It is designed to be used in SYCL environment * */ diff --git a/dpnp/backend/src/dpnp_random_state.hpp b/dpnp/backend/src/dpnp_random_state.hpp index 4f00dc074c99..862a2cb765c9 100644 --- a/dpnp/backend/src/dpnp_random_state.hpp +++ b/dpnp/backend/src/dpnp_random_state.hpp @@ -73,7 +73,7 @@ struct mcg59_struct : engine_struct * * @param [in] mt19937 A structure with MKL engine which will be filled * with generated value by MKL. - * @param [in] q_ref A refference on SYCL queue which will be used to + * @param [in] q_ref A reference on SYCL queue which will be used to * obtain random numbers. * @param [in] seed An initial condition of the generator state. */ @@ -90,7 +90,7 @@ INP_DLLEXPORT void MT19937_InitScalarSeed(mt19937_struct *mt19937, * * @param [in] mt19937 A structure with MKL engine which will be filled * with generated value by MKL. - * @param [in] q_ref A refference on SYCL queue which will be used to + * @param [in] q_ref A reference on SYCL queue which will be used to * obtain random numbers. * @param [in] seed A vector with the initial conditions of the * generator state. @@ -119,7 +119,7 @@ INP_DLLEXPORT void MT19937_Delete(mt19937_struct *mt19937); * * @param [in] mcg59 A structure with MKL engine which will be filled * with generated value by MKL. - * @param [in] q_ref A refference on SYCL queue which will be used to + * @param [in] q_ref A reference on SYCL queue which will be used to * obtain random numbers. * @param [in] seed An initial condition of the generator state. */ diff --git a/dpnp/backend/src/dpnp_utils.hpp b/dpnp/backend/src/dpnp_utils.hpp index 34547f76f769..bb939004ee09 100644 --- a/dpnp/backend/src/dpnp_utils.hpp +++ b/dpnp/backend/src/dpnp_utils.hpp @@ -46,7 +46,7 @@ /** * Version of SYCL DPC++ 2023 compiler where a return type of sycl::abs() is - * changed from unsinged integer to signed one of input vector. + * changed from unsigned integer to signed one of input vector. */ #ifndef __SYCL_COMPILER_VECTOR_ABS_CHANGED #define __SYCL_COMPILER_VECTOR_ABS_CHANGED 20230503L @@ -115,17 +115,17 @@ void get_shape_offsets_inkernel(const _DataType *shape, /** * @ingroup BACKEND_UTILS - * @brief Calculation of indeces in array + * @brief Calculation of indices in array * - * Calculates indeces of element in array with given linear position + * Calculates indices of element in array with given linear position * for example: * idx = 5, shape = (2, 3), ndim = 2, - * indeces xyz should be [1, 1] + * indices xyz should be [1, 1] * * @param [in] idx linear index of the element in multy-D array. * @param [in] ndim number of dimensions. * @param [in] shape offsets of array. - * @param [out] xyz indeces. + * @param [out] xyz indices. */ template void get_xyz_by_id(size_t idx, @@ -435,7 +435,7 @@ static inline std::vector * * @param [in] q sycl::device which is examined for type support. * - * @exception std::runtime_error type T is out of suppport by the queue. + * @exception std::runtime_error type T is out of support by the queue. */ template static inline void validate_type_for_device(const sycl::device &d) @@ -471,7 +471,7 @@ static inline void validate_type_for_device(const sycl::device &d) * * @param [in] q sycl::queue which is examined for type support. * - * @exception std::runtime_error type T is out of suppport by the queue. + * @exception std::runtime_error type T is out of support by the queue. */ template static inline void validate_type_for_device(const sycl::queue &q) @@ -490,15 +490,15 @@ static inline void validate_type_for_device(const sycl::queue &q) template std::ostream &operator<<(std::ostream &out, const std::vector &vec) { - std::string delimeter; + std::string delimiter; out << "{"; // std::copy(vec.begin(), vec.end(), std::ostream_iterator(out, ", ")); // out << "\b\b}"; // last two 'backspaces' needs to eliminate last // delimiter. ex: {2, 3, 4, } for (auto &elem : vec) { - out << delimeter << elem; - if (delimeter.empty()) { - delimeter.assign(", "); + out << delimiter << elem; + if (delimiter.empty()) { + delimiter.assign(", "); } } out << "}"; diff --git a/dpnp/backend/src/memory_sycl.cpp b/dpnp/backend/src/memory_sycl.cpp index 5a7cec6118c7..e7922bf798f3 100644 --- a/dpnp/backend/src/memory_sycl.cpp +++ b/dpnp/backend/src/memory_sycl.cpp @@ -81,7 +81,7 @@ char *dpnp_memory_alloc_c(DPCTLSyclQueueRef q_ref, size_t size_in_bytes) #if not defined(NDEBUG) if (memory_type != sycl::usm::alloc::device) { for (size_t i = 0; i < size_in_bytes / sizeof(char); ++i) { - array[i] = 0; // type dependant is better. set double(42.42) + array[i] = 0; // type dependent is better. set double(42.42) // instead zero } } diff --git a/dpnp/backend/tests/test_random.cpp b/dpnp/backend/tests/test_random.cpp index 8535c450db42..170014b052e3 100644 --- a/dpnp/backend/tests/test_random.cpp +++ b/dpnp/backend/tests/test_random.cpp @@ -36,7 +36,7 @@ // TODO // * data management will be redesigned: allocation as chars (and casting on // teste suits) -// * this class will be generlized +// * this class will be generalized class RandomTestCase : public ::testing::Test { public: diff --git a/dpnp/dparray.pyx b/dpnp/dparray.pyx index e8d9dd2e345e..7866f46ec261 100644 --- a/dpnp/dparray.pyx +++ b/dpnp/dparray.pyx @@ -323,7 +323,7 @@ cdef class dparray: @property def shape(self): - """Lengths of axes. A tuple of numbers represents size of each dimention. + """Lengths of axes. A tuple of numbers represents size of each dimension. Setter of this property involves reshaping without copy. If the array cannot be reshaped without copy, it raises an exception. @@ -336,7 +336,7 @@ cdef class dparray: @shape.setter def shape(self, newshape): - """Set new lengths of axes. A tuple of numbers represents size of each dimention. + """Set new lengths of axes. A tuple of numbers represents size of each dimension. It involves reshaping without copy. If the array cannot be reshaped without copy, it raises an exception. @@ -344,7 +344,7 @@ cdef class dparray: """ - self._dparray_shape = newshape # TODO strides, enpty dimentions and etc. + self._dparray_shape = newshape # TODO strides, enpty dimensions and etc. @property def flags(self) -> _flagsobj: @@ -1077,7 +1077,8 @@ cdef class dparray: ----------- Input array is supported as :obj:`dpnp.ndarray`. Input kth is supported as :obj:`int`. - Parameters ``axis``, ``kind`` and ``order`` are supported only with default values. + Parameters `axis`, `kind` and `order` are supported only with default values. + """ return partition(self, kth, axis, kind, order) diff --git a/dpnp/dpnp_algo/dpnp_algo.pyx b/dpnp/dpnp_algo/dpnp_algo.pyx index 0bde1b25fb2e..351e912eedaf 100644 --- a/dpnp/dpnp_algo/dpnp_algo.pyx +++ b/dpnp/dpnp_algo/dpnp_algo.pyx @@ -94,7 +94,7 @@ cpdef utils.dpnp_descriptor dpnp_astype(utils.dpnp_descriptor x1, dtype): x1_obj = x1.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = x1.shape cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, @@ -127,7 +127,7 @@ cpdef utils.dpnp_descriptor dpnp_flatten(utils.dpnp_descriptor x1): x1_obj = x1.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = (x1.size,) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, diff --git a/dpnp/dpnp_algo/dpnp_algo_arraycreation.pxi b/dpnp/dpnp_algo/dpnp_algo_arraycreation.pxi index 645ade4d813c..5ebb8d157a79 100644 --- a/dpnp/dpnp_algo/dpnp_algo_arraycreation.pxi +++ b/dpnp/dpnp_algo/dpnp_algo_arraycreation.pxi @@ -348,7 +348,7 @@ cpdef utils.dpnp_descriptor dpnp_trace(utils.dpnp_descriptor arr, offset=0, axis arr_obj = arr.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = diagonal_shape[:-1] cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, @@ -383,7 +383,7 @@ cpdef utils.dpnp_descriptor dpnp_vander(utils.dpnp_descriptor x1, int N, int inc x1_obj = x1.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = (x1.size, N) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, diff --git a/dpnp/dpnp_algo/dpnp_algo_linearalgebra.pxi b/dpnp/dpnp_algo/dpnp_algo_linearalgebra.pxi index ffa80c97be47..6614399f182f 100644 --- a/dpnp/dpnp_algo/dpnp_algo_linearalgebra.pxi +++ b/dpnp/dpnp_algo/dpnp_algo_linearalgebra.pxi @@ -170,7 +170,7 @@ cpdef utils.dpnp_descriptor dpnp_inner(dpnp_descriptor array1, dpnp_descriptor a result_sycl_device, result_usm_type, result_sycl_queue = utils.get_common_usm_allocation(array1, array2) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef utils.dpnp_descriptor result = utils_py.create_output_descriptor_py(result_shape, result_type, None, @@ -261,7 +261,7 @@ cpdef utils.dpnp_descriptor dpnp_kron(dpnp_descriptor in_array1, dpnp_descriptor result_sycl_device, result_usm_type, result_sycl_queue = utils.get_common_usm_allocation(in_array1, in_array2) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None, @@ -340,7 +340,7 @@ cpdef utils.dpnp_descriptor dpnp_matmul(utils.dpnp_descriptor in_array1, utils.d # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_MATMUL_EXT, param1_type, param2_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data result_sycl_device, result_usm_type, result_sycl_queue = utils.get_common_usm_allocation(in_array1, in_array2) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(shape_result, kernel_data.return_type, diff --git a/dpnp/dpnp_algo/dpnp_algo_manipulation.pxi b/dpnp/dpnp_algo/dpnp_algo_manipulation.pxi index 4280bd621ce9..f483b5b05c37 100644 --- a/dpnp/dpnp_algo/dpnp_algo_manipulation.pxi +++ b/dpnp/dpnp_algo/dpnp_algo_manipulation.pxi @@ -109,7 +109,7 @@ cpdef utils.dpnp_descriptor dpnp_repeat(utils.dpnp_descriptor array1, repeats, a array1_obj = array1.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = (array1.size * repeats, ) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, diff --git a/dpnp/dpnp_algo/dpnp_algo_mathematical.pxi b/dpnp/dpnp_algo/dpnp_algo_mathematical.pxi index 425b277d330d..21f7768cf2b0 100644 --- a/dpnp/dpnp_algo/dpnp_algo_mathematical.pxi +++ b/dpnp/dpnp_algo/dpnp_algo_mathematical.pxi @@ -209,7 +209,7 @@ cpdef utils.dpnp_descriptor dpnp_gradient(utils.dpnp_descriptor y1, int dx=1): y1_obj = y1.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils_py.create_output_descriptor_py(result_shape, dpnp.default_float_type(y1_obj.sycl_queue), @@ -258,7 +258,7 @@ cpdef tuple dpnp_modf(utils.dpnp_descriptor x1): x1_obj = x1.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = x1.shape cdef utils.dpnp_descriptor result1 = utils.create_output_descriptor(result_shape, kernel_data.return_type, @@ -367,13 +367,13 @@ cpdef utils.dpnp_descriptor dpnp_prod(utils.dpnp_descriptor x1, object initial=None, object where=True): """ - input:float64 : outout:float64 : name:prod - input:float32 : outout:float32 : name:prod - input:int64 : outout:int64 : name:prod - input:int32 : outout:int64 : name:prod - input:bool : outout:int64 : name:prod - input:complex64 : outout:complex64 : name:prod - input:complex128: outout:complex128: name:prod + input:float64 : output:float64 : name:prod + input:float32 : output:float32 : name:prod + input:int64 : output:int64 : name:prod + input:int32 : output:int64 : name:prod + input:bool : output:int64 : name:prod + input:complex64 : output:complex64 : name:prod + input:complex128: output:complex128: name:prod """ cdef shape_type_c x1_shape = x1.shape @@ -485,7 +485,7 @@ cpdef utils.dpnp_descriptor dpnp_trapz(utils.dpnp_descriptor y1, utils.dpnp_desc result_sycl_device, result_usm_type, result_sycl_queue = utils.get_common_usm_allocation(y1, x1) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = (1,) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, diff --git a/dpnp/dpnp_algo/dpnp_algo_searching.pxi b/dpnp/dpnp_algo/dpnp_algo_searching.pxi index 46f1c83f42b5..a84c918f3c23 100644 --- a/dpnp/dpnp_algo/dpnp_algo_searching.pxi +++ b/dpnp/dpnp_algo/dpnp_algo_searching.pxi @@ -55,7 +55,7 @@ cpdef utils.dpnp_descriptor dpnp_argmax(utils.dpnp_descriptor in_array1): in_array1_obj = in_array1.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = (1,) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, @@ -91,7 +91,7 @@ cpdef utils.dpnp_descriptor dpnp_argmin(utils.dpnp_descriptor in_array1): in_array1_obj = in_array1.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = (1,) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, diff --git a/dpnp/dpnp_algo/dpnp_algo_statistics.pxi b/dpnp/dpnp_algo/dpnp_algo_statistics.pxi index 1c35cb4ac337..43463c7791d3 100644 --- a/dpnp/dpnp_algo/dpnp_algo_statistics.pxi +++ b/dpnp/dpnp_algo/dpnp_algo_statistics.pxi @@ -86,7 +86,7 @@ cdef utils.dpnp_descriptor call_fptr_custom_std_var_1in_1out(DPNPFuncName fptr_n x1_obj = x1.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = (1,) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, @@ -144,7 +144,7 @@ cpdef utils.dpnp_descriptor dpnp_correlate(utils.dpnp_descriptor x1, utils.dpnp_ result_sycl_device, result_usm_type, result_sycl_queue = utils.get_common_usm_allocation(x1, x2) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = (1,) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, @@ -185,7 +185,7 @@ cdef utils.dpnp_descriptor _dpnp_max(utils.dpnp_descriptor x1, _axis_, shape_typ x1_obj = x1.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None, @@ -392,7 +392,7 @@ cpdef utils.dpnp_descriptor dpnp_nanvar(utils.dpnp_descriptor arr, ddof): arr_obj = arr.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(res_size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, diff --git a/dpnp/dpnp_algo/dpnp_elementwise_common.py b/dpnp/dpnp_algo/dpnp_elementwise_common.py index 629c1e0a4c98..dfbb664c2f38 100644 --- a/dpnp/dpnp_algo/dpnp_elementwise_common.py +++ b/dpnp/dpnp_algo/dpnp_elementwise_common.py @@ -2851,7 +2851,7 @@ def dpnp_square(x, out=None, order="K"): _subtract_docstring_ = """ subtract(x1, x2, out=None, order="K") -Calculates the difference bewteen each element `x1_i` of the input +Calculates the difference between each element `x1_i` of the input array `x1` and the respective element `x2_i` of the input array `x2`. Args: diff --git a/dpnp/dpnp_array.py b/dpnp/dpnp_array.py index 3fd40b075965..5d623c415e5f 100644 --- a/dpnp/dpnp_array.py +++ b/dpnp/dpnp_array.py @@ -35,7 +35,7 @@ def _get_unwrapped_index_key(key): Get an unwrapped index key. Return a key where each nested instance of DPNP array is unwrapped into USM ndarray - for futher processing in DPCTL advanced indexing functions. + for further processing in DPCTL advanced indexing functions. """ @@ -1100,7 +1100,7 @@ def round(self, decimals=0, out=None): @property def shape(self): - """Lengths of axes. A tuple of numbers represents size of each dimention. + """Lengths of axes. A tuple of numbers represents size of each dimension. Setter of this property involves reshaping without copy. If the array cannot be reshaped without copy, it raises an exception. @@ -1116,7 +1116,7 @@ def shape(self, newshape): """ Set new lengths of axes. - A tuple of numbers represents size of each dimention. + A tuple of numbers represents size of each dimension. It involves reshaping without copy. If the array cannot be reshaped without copy, it raises an exception. diff --git a/dpnp/dpnp_container.py b/dpnp/dpnp_container.py index c8c0858df7ea..b36b64a5113f 100644 --- a/dpnp/dpnp_container.py +++ b/dpnp/dpnp_container.py @@ -29,7 +29,7 @@ Notes ----- -This module contains code and dependency on diffrent containers used in DPNP +This module contains code and dependency on different containers used in DPNP """ diff --git a/dpnp/dpnp_iface.py b/dpnp/dpnp_iface.py index c131bf733ce1..ecb3e48aaf6b 100644 --- a/dpnp/dpnp_iface.py +++ b/dpnp/dpnp_iface.py @@ -262,7 +262,7 @@ def get_dpnp_descriptor( """ Return True: never - Return DPNP internal data discriptor object if: + Return DPNP internal data descriptor object if: 1. We can proceed with input data object with DPNP 2. We want to handle input data object Return False if: diff --git a/dpnp/dpnp_iface_arraycreation.py b/dpnp/dpnp_iface_arraycreation.py index 33a1f871d79a..2a8d80fc3891 100644 --- a/dpnp/dpnp_iface_arraycreation.py +++ b/dpnp/dpnp_iface_arraycreation.py @@ -1027,7 +1027,7 @@ def geomspace(start, stop, num=50, endpoint=True, dtype=None, axis=0): Limitations ----------- - Parameter ``axis`` is supported only with default value ``0``. + Parameter `axis` is supported only with default value ``0``. See Also -------- @@ -1514,7 +1514,8 @@ def ptp(arr, axis=None, out=None, keepdims=numpy._NoValue): Limitations ----------- Input array is supported as :obj:`dpnp.ndarray`. - Parameters ``out`` and ``keepdims`` are supported only with default values. + Parameters `out` and `keepdims` are supported only with default values. + """ arr_desc = dpnp.get_dpnp_descriptor(arr, copy_when_nondefault_queue=False) if not arr_desc: diff --git a/dpnp/dpnp_iface_counting.py b/dpnp/dpnp_iface_counting.py index 1b5a6e6fe991..b02645fbe994 100644 --- a/dpnp/dpnp_iface_counting.py +++ b/dpnp/dpnp_iface_counting.py @@ -57,10 +57,10 @@ def count_nonzero(x1, axis=None, *, keepdims=False): Limitations ----------- - Parameter ``x1`` is supported as :obj:`dpnp.ndarray`. - Otherwise the function will be executed sequentially on CPU. - Parameter ``axis`` is supported only with default value `None`. - Parameter ``keepdims`` is supported only with default value `False`. + Parameter `x1` is supported as :obj:`dpnp.ndarray`. + Otherwise the function will be executed sequentially on CPU. + Parameter `axis` is supported only with default value `None`. + Parameter `keepdims` is supported only with default value `False`. Examples -------- diff --git a/dpnp/dpnp_iface_indexing.py b/dpnp/dpnp_iface_indexing.py index 0c19127831a1..bc04a47efafd 100644 --- a/dpnp/dpnp_iface_indexing.py +++ b/dpnp/dpnp_iface_indexing.py @@ -218,8 +218,9 @@ def diagonal(x1, offset=0, axis1=0, axis2=1): Limitations ----------- Input array is supported as :obj:`dpnp.ndarray`. - Parameters ``axis1`` and ``axis2`` are supported only with default values. + Parameters `axis1` and `axis2` are supported only with default values. Otherwise the function will be executed sequentially on CPU. + """ x1_desc = dpnp.get_dpnp_descriptor(x1, copy_when_nondefault_queue=False) @@ -284,7 +285,7 @@ def fill_diagonal(x1, val, wrap=False): Limitations ----------- - Parameter ``wrap`` is supported only with default values. + Parameter `wrap` is supported only with default values. See Also -------- @@ -314,8 +315,9 @@ def indices(dimensions, dtype=int, sparse=False): Limitations ----------- - Parameters ``dtype`` and ``sparse`` are supported only with default values. - Parameter ``dimensions`` is supported with len <=2. + Parameters `dtype` and `sparse` are supported only with default values. + Parameter `dimensions` is supported with len <=2. + """ if not isinstance(dimensions, (tuple, list)): @@ -562,7 +564,7 @@ def select(condlist, choicelist, default=0): Limitations ----------- Arrays of input lists are supported as :obj:`dpnp.ndarray`. - Parameter ``default`` are supported only with default values. + Parameter `default` is supported only with default values. """ if not use_origin_backend(): diff --git a/dpnp/dpnp_iface_libmath.py b/dpnp/dpnp_iface_libmath.py index 046767f22e25..3d016e7d1d0e 100644 --- a/dpnp/dpnp_iface_libmath.py +++ b/dpnp/dpnp_iface_libmath.py @@ -56,7 +56,7 @@ def erf(in_array1): Limitations ----------- - Parameter ``in_array1`` is supported as :obj:`dpnp.ndarray`. + Parameter `in_array1` is supported as :obj:`dpnp.ndarray`. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP :ref:`Data types`. diff --git a/dpnp/dpnp_iface_linearalgebra.py b/dpnp/dpnp_iface_linearalgebra.py index 3e3e92d82450..30b6134da179 100644 --- a/dpnp/dpnp_iface_linearalgebra.py +++ b/dpnp/dpnp_iface_linearalgebra.py @@ -198,9 +198,9 @@ def inner(x1, x2, **kwargs): Limitations ----------- - Parameters ``x1`` and ``x2`` are supported as :obj:`dpnp.ndarray`. - Keyword arguments ``kwargs`` are currently unsupported. - Otherwise the functions will be executed sequentially on CPU. + Parameters `x1` and `x2` are supported as :obj:`dpnp.ndarray`. + Keyword argument `kwargs` is currently unsupported. + Otherwise the functions will be executed sequentially on CPU. See Also -------- @@ -256,7 +256,7 @@ def matmul(x1, x2, out=None, **kwargs): ----------- Input arrays are supported as :obj:`dpnp.ndarray`. Otherwise the function will be executed sequentially on CPU. - Parameter ``out`` is supported as :obj:`dpnp.ndarray` and as default value ``None``. + Parameter `out` is supported as :obj:`dpnp.ndarray` and as default value ``None``. Input array data types are limited by supported DPNP :ref:`Data types`. See Also @@ -392,11 +392,11 @@ def tensordot(x1, x2, axes=2): Limitations ----------- - Parameters ``x1`` and ``x2`` are supported as :obj:`dpnp.ndarray`. - Keyword arguments ``kwargs`` are currently unsupported. - Parameter ``axes`` is supported only with value ``1``. - Otherwise the functions will be executed sequentially on CPU. - Input array data types are limited by supported DPNP :ref:`Data types`. + Parameters `x1` and `x2` are supported as :obj:`dpnp.ndarray`. + Keyword argument `kwargs` is currently unsupported. + Parameter `axes` is supported only with value ``1``. + Otherwise the functions will be executed sequentially on CPU. + Input array data types are limited by supported DPNP :ref:`Data types`. See Also -------- diff --git a/dpnp/dpnp_iface_logic.py b/dpnp/dpnp_iface_logic.py index c4704d09f9a0..169e0bc607a1 100644 --- a/dpnp/dpnp_iface_logic.py +++ b/dpnp/dpnp_iface_logic.py @@ -172,7 +172,7 @@ def allclose(a, b, rtol=1.0e-5, atol=1.0e-8, **kwargs): Keyword argument `kwargs` is currently unsupported. Otherwise the functions will be executed sequentially on CPU. Parameters `rtol` and `atol` are supported as scalars. Otherwise - ``TypeError`` exeption will be raised. + ``TypeError`` exception will be raised. Input array data types are limited by supported integer and floating DPNP :ref:`Data types`. diff --git a/dpnp/dpnp_iface_manipulation.py b/dpnp/dpnp_iface_manipulation.py index 41e55ee80d49..a9de67e965b5 100644 --- a/dpnp/dpnp_iface_manipulation.py +++ b/dpnp/dpnp_iface_manipulation.py @@ -850,10 +850,10 @@ def repeat(a, repeats, axis=None): Limitations ----------- Input array is supported as :obj:`dpnp.ndarray`. - Parameter ``axis`` is supported with value either ``None`` or ``0``. + Parameter `axis` is supported with value either ``None`` or ``0``. Dimension of input array are supported to be less than ``2``. Otherwise the function will be executed sequentially on CPU. - If ``repeats`` is ``tuple`` or ``list``, should be ``len(repeats) > 1``. + If `repeats` is ``tuple`` or ``list``, should be ``len(repeats) > 1``. Input array data types are limited by supported DPNP :ref:`Data types`. .. seealso:: :obj:`numpy.tile` tile an array. diff --git a/dpnp/dpnp_iface_searching.py b/dpnp/dpnp_iface_searching.py index bb19e547fe33..26fc1528a0fa 100644 --- a/dpnp/dpnp_iface_searching.py +++ b/dpnp/dpnp_iface_searching.py @@ -61,8 +61,8 @@ def argmax(x1, axis=None, out=None): ----------- Input array is supported as :obj:`dpnp.ndarray`. Otherwise the function will be executed sequentially on CPU. - Parameter ``axis`` is supported only with default value ``None``. - Parameter ``out`` is supported only with default value ``None``. + Parameter `axis` is supported only with default value ``None``. + Parameter `out` is supported only with default value ``None``. Input array data types are limited by supported DPNP :ref:`Data types`. See Also @@ -116,8 +116,8 @@ def argmin(x1, axis=None, out=None): ----------- Input array is supported as :obj:`dpnp.ndarray`. Otherwise the function will be executed sequentially on CPU. - Parameter ``axis`` is supported only with default value ``None``. - Parameter ``out`` is supported only with default value ``None``. + Parameter `axis` is supported only with default value ``None``. + Parameter `out` is supported only with default value ``None``. Input array data types are limited by supported DPNP :ref:`Data types`. See Also diff --git a/dpnp/dpnp_iface_sorting.py b/dpnp/dpnp_iface_sorting.py index c02fbddd8d24..6e7c116a913e 100644 --- a/dpnp/dpnp_iface_sorting.py +++ b/dpnp/dpnp_iface_sorting.py @@ -59,9 +59,9 @@ def argsort(in_array1, axis=-1, kind=None, order=None): ----------- Input array is supported as :obj:`dpnp.ndarray`. Otherwise the function will be executed sequentially on CPU. - Prameters ``axis`` is supported only with default value ``-1``. - Prameters ``kind`` is supported only with default value ``None``. - Prameters ``order`` is supported only with default value ``None``. + Parameter `axis` is supported only with default value ``-1``. + Parameter `kind` is supported only with default value ``None``. + Parameter `order` is supported only with default value ``None``. Input array data types are limited by supported DPNP :ref:`Data types`. See Also @@ -108,7 +108,8 @@ def partition(x1, kth, axis=-1, kind="introselect", order=None): ----------- Input array is supported as :obj:`dpnp.ndarray`. Input kth is supported as :obj:`int`. - Parameters ``axis``, ``kind`` and ``order`` are supported only with default values. + Parameters `axis`, `kind` and `order` are supported only with default values. + """ x1_desc = dpnp.get_dpnp_descriptor(x1, copy_when_nondefault_queue=False) @@ -142,7 +143,8 @@ def searchsorted(x1, x2, side="left", sorter=None): Input arrays is supported as :obj:`dpnp.ndarray`. Input array is supported only sorted. Input side is supported only values ``left``, ``right``. - Parameters ``sorter`` is supported only with default values. + Parameter `sorter` is supported only with default values. + """ x1_desc = dpnp.get_dpnp_descriptor(x1, copy_when_nondefault_queue=False) diff --git a/dpnp/dpnp_iface_statistics.py b/dpnp/dpnp_iface_statistics.py index 2594901039f0..c7254ad6d01f 100644 --- a/dpnp/dpnp_iface_statistics.py +++ b/dpnp/dpnp_iface_statistics.py @@ -136,9 +136,9 @@ def average(x1, axis=None, weights=None, returned=False): Limitations ----------- Input array is supported as :obj:`dpnp.ndarray`. - Prameters ``axis`` is supported only with default value ``None``. - Prameters ``weights`` is supported only with default value ``None``. - Prameters ``returned`` is supported only with default value ``False``. + Parameter `axis` is supported only with default value ``None``. + Parameter `weights` is supported only with default value ``None``. + Parameter `returned` is supported only with default value ``False``. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP :ref:`Data types`. @@ -206,7 +206,7 @@ def correlate(x1, x2, mode="valid"): ----------- Input arrays are supported as :obj:`dpnp.ndarray`. Size and shape of input arrays are supported to be equal. - Prameters ``mode`` is supported only with default value ``"valid``. + Parameter `mode` is supported only with default value ``"valid``. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP :ref:`Data types`. @@ -267,11 +267,11 @@ def cov( Input array ``m`` is supported as :obj:`dpnp.ndarray`. Dimension of input array ``m`` is limited by ``m.ndim <= 2``. Size and shape of input arrays are supported to be equal. - Prameters ``y`` is supported only with default value ``None``. - Prameters ``bias`` is supported only with default value ``False``. - Prameters ``ddof`` is supported only with default value ``None``. - Prameters ``fweights`` is supported only with default value ``None``. - Prameters ``aweights`` is supported only with default value ``None``. + Parameter `y` is supported only with default value ``None``. + Parameter `bias` is supported only with default value ``False``. + Parameter `ddof` is supported only with default value ``None``. + Parameter `fweights` is supported only with default value ``None``. + Parameter `aweights` is supported only with default value ``None``. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP :ref:`Data types`. @@ -360,7 +360,7 @@ def max(x1, axis=None, out=None, keepdims=False, initial=None, where=True): ----------- Input array is supported as :obj:`dpnp.ndarray`. Otherwise the function will be executed sequentially on CPU. - Prameters ``out`` is supported only with default value ``None``. + Parameter `out` is supported only with default value ``None``. Input array data types are limited by supported DPNP :ref:`Data types`. Examples @@ -523,10 +523,10 @@ def median(x1, axis=None, out=None, overwrite_input=False, keepdims=False): Limitations ----------- Input array is supported as :obj:`dpnp.ndarray`. - Prameters ``axis`` is supported only with default value ``None``. - Prameters ``out`` is supported only with default value ``None``. - Prameters ``overwrite_input`` is supported only with default value ``False``. - Prameters ``keepdims`` is supported only with default value ``False``. + Parameter `axis` is supported only with default value ``None``. + Parameter `out` is supported only with default value ``None``. + Parameter `overwrite_input` is supported only with default value ``False``. + Parameter `keepdims` is supported only with default value ``False``. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP :ref:`Data types`. @@ -572,7 +572,7 @@ def min(x1, axis=None, out=None, keepdims=False, initial=None, where=True): ----------- Input array is supported as :obj:`dpnp.ndarray`. Otherwise the function will be executed sequentially on CPU. - Prameters ``out`` is supported only with default value ``None``. + Parameter `out` is supported only with default value ``None``. Input array data types are limited by supported DPNP :ref:`Data types`. Examples @@ -616,10 +616,10 @@ def nanvar(x1, axis=None, dtype=None, out=None, ddof=0, keepdims=False): Limitations ----------- Input array is supported as :obj:`dpnp.ndarray`. - Prameters ``axis`` is supported only with default value ``None``. - Prameters ``dtype`` is supported only with default value ``None``. - Prameters ``out`` is supported only with default value ``None``. - Prameters ``keepdims`` is supported only with default value ``numpy._NoValue``. + Parameter `axis` is supported only with default value ``None``. + Parameter `dtype` is supported only with default value ``None``. + Parameter `out` is supported only with default value ``None``. + Parameter `keepdims` is supported only with default value ``numpy._NoValue``. Otherwise the function will be executed sequentially on CPU. """ @@ -662,10 +662,10 @@ def std(x1, axis=None, dtype=None, out=None, ddof=0, keepdims=False): ----------- Input array is supported as :obj:`dpnp.ndarray`. Size of input array is limited by ``a.size > 0``. - Prameters ``axis`` is supported only with default value ``None``. - Prameters ``dtype`` is supported only with default value ``None``. - Prameters ``out`` is supported only with default value ``None``. - Prameters ``keepdims`` is supported only with default value ``numpy._NoValue``. + Parameter `axis` is supported only with default value ``None``. + Parameter `dtype` is supported only with default value ``None``. + Parameter `out` is supported only with default value ``None``. + Parameter `keepdims` is supported only with default value ``numpy._NoValue``. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP :ref:`Data types`. @@ -720,10 +720,10 @@ def var(x1, axis=None, dtype=None, out=None, ddof=0, keepdims=False): ----------- Input array is supported as :obj:`dpnp.ndarray`. Size of input array is limited by ``a.size > 0``. - Prameters ``axis`` is supported only with default value ``None``. - Prameters ``dtype`` is supported only with default value ``None``. - Prameters ``out`` is supported only with default value ``None``. - Prameters ``keepdims`` is supported only with default value ``numpy._NoValue``. + Parameter `axis` is supported only with default value ``None``. + Parameter `dtype` is supported only with default value ``None``. + Parameter `out` is supported only with default value ``None``. + Parameter `keepdims` is supported only with default value ``numpy._NoValue``. Otherwise the function will be executed sequentially on CPU. Input array data types are limited by supported DPNP :ref:`Data types`. diff --git a/dpnp/dpnp_utils/dpnp_algo_utils.pyx b/dpnp/dpnp_utils/dpnp_algo_utils.pyx index 9ec9174d4006..aca73463a911 100644 --- a/dpnp/dpnp_utils/dpnp_algo_utils.pyx +++ b/dpnp/dpnp_utils/dpnp_algo_utils.pyx @@ -28,7 +28,7 @@ """Module Utilities -This module contains differnt helpers and utilities +This module contains different helpers and utilities """ @@ -129,7 +129,7 @@ def call_origin(function, *args, **kwargs): allow_fallback = kwargs.pop("allow_fallback", False) if not allow_fallback and config.__DPNP_RAISE_EXCEPION_ON_NUMPY_FALLBACK__ == 1: - raise NotImplementedError(f"Requested funtion={function.__name__} with args={args} and kwargs={kwargs} " + raise NotImplementedError(f"Requested function={function.__name__} with args={args} and kwargs={kwargs} " "isn't currently supported and would fall back on NumPy implementation. " "Define environment variable `DPNP_RAISE_EXCEPION_ON_NUMPY_FALLBACK` to `0` " "if the fall back is required to be supported without raising an exception.") @@ -166,7 +166,7 @@ def call_origin(function, *args, **kwargs): exec_q = dpu.get_execution_queue(alloc_queues) if exec_q is None: exec_q = dpnp.get_normalized_queue_device(sycl_queue=sycl_queue) - # print(f"DPNP call_origin(): bakend called. \n\t function={function}, \n\t args_new={args_new}, \n\t kwargs_new={kwargs_new}, \n\t dpnp_inplace={dpnp_inplace}") + # print(f"DPNP call_origin(): backend called. \n\t function={function}, \n\t args_new={args_new}, \n\t kwargs_new={kwargs_new}, \n\t dpnp_inplace={dpnp_inplace}") # TODO need to put array memory into NumPy call result_origin = function(*args_new, **kwargs_new) # print(f"DPNP call_origin(): result from backend. \n\t result_origin={result_origin}, \n\t args_new={args_new}, \n\t kwargs_new={kwargs_new}, \n\t dpnp_inplace={dpnp_inplace}") @@ -255,7 +255,7 @@ def get_usm_allocations(objects): Given a list of objects returns a tuple of USM type and SYCL queue which can be used for a memory allocation and to follow compute follows data paradigm, or returns `(None, None)` if the default USM type and SYCL queue can be used. - An exception will be raised, if the paradigm is broked for the given list of objects. + An exception will be raised, if the paradigm is broken for the given list of objects. """ @@ -333,7 +333,7 @@ cpdef checker_throw_type_error(function_name, given_type): cpdef checker_throw_value_error(function_name, param_name, param, expected): # import sys # sys.tracebacklimit = 0 - err_msg = f"{ERROR_PREFIX} in function {function_name}() paramenter '{param_name}'" + err_msg = f"{ERROR_PREFIX} in function {function_name}() parameter '{param_name}'" err_msg += f" expected `{expected}`, but '{param}' provided" raise ValueError(err_msg) @@ -682,18 +682,18 @@ cdef (DPNPFuncType, void *) get_ret_type_and_func(DPNPFuncData kernel_data, cdef class dpnp_descriptor: def __init__(self, obj, dpnp_descriptor orig_desc=None): - """ Initialze variables """ + """ Initialize variables """ self.origin_pyobj = None self.origin_desc = None self.descriptor = None self.dpnp_descriptor_data_size = 0 self.dpnp_descriptor_is_scalar = True - """ Accure DPCTL data container storage """ + """ Acquire DPCTL data container storage """ self.descriptor = getattr(obj, "__sycl_usm_array_interface__", None) if self.descriptor is None: - """ Accure main data storage """ + """ Acquire main data storage """ self.descriptor = getattr(obj, "__array_interface__", None) if self.descriptor is None: return diff --git a/dpnp/fft/dpnp_algo_fft.pyx b/dpnp/fft/dpnp_algo_fft.pyx index b751354a1e07..0ffb4b032ceb 100644 --- a/dpnp/fft/dpnp_algo_fft.pyx +++ b/dpnp/fft/dpnp_algo_fft.pyx @@ -74,7 +74,7 @@ cpdef utils.dpnp_descriptor dpnp_fft(utils.dpnp_descriptor input, cdef DPNPFuncType return_type = ret_type_and_func[0] cdef fptr_dpnp_fft_fft_t func = < fptr_dpnp_fft_fft_t > ret_type_and_func[1] - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef utils.dpnp_descriptor result = utils.create_output_descriptor(output_shape, return_type, None, @@ -133,7 +133,7 @@ cpdef utils.dpnp_descriptor dpnp_rfft(utils.dpnp_descriptor input, cdef DPNPFuncType return_type = ret_type_and_func[0] cdef fptr_dpnp_fft_fft_t func = < fptr_dpnp_fft_fft_t > ret_type_and_func[1] - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef utils.dpnp_descriptor result = utils.create_output_descriptor(output_shape, return_type, None, diff --git a/dpnp/fft/dpnp_iface_fft.py b/dpnp/fft/dpnp_iface_fft.py index 0e1a5a982233..c82b36096495 100644 --- a/dpnp/fft/dpnp_iface_fft.py +++ b/dpnp/fft/dpnp_iface_fft.py @@ -818,7 +818,7 @@ def rfftfreq(n=None, d=1.0): Limitations ----------- - Parameter ``d`` is unsupported. + Parameter `d` is unsupported. """ diff --git a/dpnp/linalg/dpnp_algo_linalg.pyx b/dpnp/linalg/dpnp_algo_linalg.pyx index 39ba81bac593..8b0fd4a0d386 100644 --- a/dpnp/linalg/dpnp_algo_linalg.pyx +++ b/dpnp/linalg/dpnp_algo_linalg.pyx @@ -88,7 +88,7 @@ cpdef utils.dpnp_descriptor dpnp_cholesky(utils.dpnp_descriptor input_): input_obj = input_.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef utils.dpnp_descriptor result = utils.create_output_descriptor(input_.shape, kernel_data.return_type, None, @@ -158,7 +158,7 @@ cpdef utils.dpnp_descriptor dpnp_det(utils.dpnp_descriptor input): input_obj = input.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None, @@ -248,7 +248,7 @@ cpdef utils.dpnp_descriptor dpnp_eigvals(utils.dpnp_descriptor input): cdef DPNPFuncType return_type = ret_type_and_func[0] cdef custom_linalg_1in_1out_with_size_func_ptr_t_ func = < custom_linalg_1in_1out_with_size_func_ptr_t_ > ret_type_and_func[1] - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef utils.dpnp_descriptor res_val = utils.create_output_descriptor((size,), return_type, None, @@ -288,7 +288,7 @@ cpdef utils.dpnp_descriptor dpnp_inv(utils.dpnp_descriptor input): cdef DPNPFuncType return_type = ret_type_and_func[0] cdef custom_linalg_1in_1out_func_ptr_t func = < custom_linalg_1in_1out_func_ptr_t > ret_type_and_func[1] - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef utils.dpnp_descriptor result = utils.create_output_descriptor(input_shape, return_type, None, @@ -322,7 +322,7 @@ cpdef utils.dpnp_descriptor dpnp_matrix_rank(utils.dpnp_descriptor input): input_obj = input.get_array() - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef utils.dpnp_descriptor result = utils.create_output_descriptor((1,), kernel_data.return_type, None, diff --git a/dpnp/linalg/dpnp_utils_linalg.py b/dpnp/linalg/dpnp_utils_linalg.py index e818835ecbee..54c01c20248e 100644 --- a/dpnp/linalg/dpnp_utils_linalg.py +++ b/dpnp/linalg/dpnp_utils_linalg.py @@ -45,7 +45,7 @@ def dpnp_eigh(a, UPLO): Return the eigenvalues and eigenvectors of a complex Hermitian (conjugate symmetric) or a real symmetric matrix. - The main calculation is done by calling an extention function + The main calculation is done by calling an extension function for LAPACK library of OneMKL. Depending on input type of `a` array, it will be either ``heevd`` (for complex types) or ``syevd`` (for others). diff --git a/dpnp/random/dpnp_algo_random.pyx b/dpnp/random/dpnp_algo_random.pyx index e9206bd6682c..85557c781a5a 100644 --- a/dpnp/random/dpnp_algo_random.pyx +++ b/dpnp/random/dpnp_algo_random.pyx @@ -298,7 +298,7 @@ cdef class _Engine: if sycl_queue is None: raise ValueError("SyclQueue isn't defined") - # keep a refference on SYCL queue + # keep a reference on SYCL queue self.q = sycl_queue self.q_ref = c_dpctl.DPCTLQueue_Copy((self.q).get_queue_ref()) if self.q_ref is NULL: @@ -344,7 +344,7 @@ cdef class _Engine: # get the FPTR data structure kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_NORMAL_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None, @@ -379,7 +379,7 @@ cdef class _Engine: # get the FPTR data structure kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_UNIFORM_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None, @@ -519,7 +519,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_beta(double a, double b, size): # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_BETA_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -558,7 +558,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_binomial(int ntrial, double p, size): # get the FPTR data structure kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_BINOMIAL_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -591,7 +591,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_chisquare(int df, size): # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_CHISQUARE_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -626,7 +626,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_exponential(double beta, size): # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_EXPONENTIAL_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -659,7 +659,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_f(double df_num, double df_den, size): # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_F_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -695,7 +695,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_gamma(double shape, double scale, size): kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_GAMMA_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -734,7 +734,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_geometric(float p, size): # get the FPTR data structure kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_GEOMETRIC_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -769,7 +769,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_gumbel(double loc, double scale, size): param1_type = dpnp_dtype_to_DPNPFuncType(dtype) kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_GUMBEL_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -807,7 +807,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_hypergeometric(int l, int s, int m, size): # get the FPTR data structure kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_HYPERGEOMETRIC_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -845,7 +845,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_laplace(double loc, double scale, size): # get the FPTR data structure kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_LAPLACE_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -878,7 +878,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_logistic(double loc, double scale, size): # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_LOGISTIC_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -916,7 +916,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_lognormal(double mean, double stddev, size) # get the FPTR data structure kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_LOGNORMAL_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -958,7 +958,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_multinomial(int ntrial, utils.dpnp_descript # get the FPTR data structure kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_MULTINOMIAL_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) p_obj = p.get_array() @@ -1011,7 +1011,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_multivariate_normal(utils.dpnp_descriptor m # get the FPTR data structure kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_MULTIVARIATE_NORMAL, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) result_sycl_device, result_usm_type, result_sycl_queue = utils.get_common_usm_allocation(mean, cov) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, @@ -1063,7 +1063,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_negative_binomial(double a, double p, size) # get the FPTR data structure kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_NEGATIVE_BINOMIAL_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) result_sycl_queue = result.get_array().sycl_queue @@ -1095,7 +1095,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_noncentral_chisquare(double df, double nonc # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_NONCENTRAL_CHISQUARE_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -1129,7 +1129,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_pareto(double alpha, size): # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_PARETO_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -1177,7 +1177,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_poisson(double lam, size): # get the FPTR data structure kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_POISSON_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) result_sycl_queue = result.get_array().sycl_queue @@ -1209,7 +1209,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_power(double alpha, size): # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_POWER_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -1256,7 +1256,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_rayleigh(double scale, size): # get the FPTR data structure kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_RAYLEIGH_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) result_sycl_queue = result.get_array().sycl_queue @@ -1335,7 +1335,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_standard_cauchy(size): # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_STANDARD_CAUCHY_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -1370,7 +1370,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_standard_exponential(size): # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_STANDARD_EXPONENTIAL_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -1417,7 +1417,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_standard_gamma(double shape, size): # get the FPTR data structure kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_STANDARD_GAMMA_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) result_sycl_queue = result.get_array().sycl_queue @@ -1449,7 +1449,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_standard_t(double df, size): # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_STANDARD_T_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -1483,7 +1483,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_triangular(double left, double mode, double # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_TRIANGULAR_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -1516,7 +1516,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_vonmises(double mu, double kappa, size): # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_VONMISES_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -1550,7 +1550,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_wald(double mean, double scale, size): # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_WALD_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -1588,7 +1588,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_weibull(double a, size): # get the FPTR data structure kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_WEIBULL_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) @@ -1621,7 +1621,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_zipf(double a, size): # get the FPTR data structure cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_ZIPF_EXT, param1_type, param1_type) - # ceate result array with type given by FPTR data + # create result array with type given by FPTR data cdef shape_type_c result_shape = utils._object_to_tuple(size) cdef utils.dpnp_descriptor result = utils.create_output_descriptor(result_shape, kernel_data.return_type, None) diff --git a/dpnp/random/dpnp_iface_random.py b/dpnp/random/dpnp_iface_random.py index 7a7f981f0945..1d647dc225b0 100644 --- a/dpnp/random/dpnp_iface_random.py +++ b/dpnp/random/dpnp_iface_random.py @@ -127,7 +127,7 @@ def beta(a, b, size=None): Limitations ----------- - Parameters ``a`` and ``b`` are supported as scalar. + Parameters `a` and `b` are supported as scalar. Otherwise, :obj:`numpy.random.beta(a, b, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -166,7 +166,7 @@ def binomial(n, p, size=None): Limitations ----------- Output array data type is :obj:`dpnp.int32`. - Parameters ``n`` and ``p`` are supported as scalar. + Parameters `n` and `p` are supported as scalar. Otherwise, :obj:`numpy.random.binomial(n, p, size)` samples are drawn. Examples @@ -228,7 +228,7 @@ def chisquare(df, size=None): Limitations ----------- - Parameter ``df`` is supported as a scalar. + Parameter `df` is supported as a scalar. Otherwise, :obj:`numpy.random.chisquare(df, size)` samples are drawn. Output array data type is default float type. @@ -296,7 +296,7 @@ def exponential(scale=1.0, size=None): Limitations ----------- - Parameter ``scale`` is supported as a scalar. + Parameter `scale` is supported as a scalar. Otherwise, :obj:`numpy.random.exponential(scale, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -330,9 +330,10 @@ def f(dfnum, dfden, size=None): Limitations ----------- - Parameters ``dfnum`` and ``dfden`` are supported as scalar. + Parameters `dfnum` and `dfden` are supported as scalar. Otherwise, :obj:`numpy.random.f(dfnum, dfden, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. + Examples -------- >>> dfnum, dfden = 3., 2. @@ -366,7 +367,7 @@ def gamma(shape, scale=1.0, size=None): Limitations ----------- - Parameters ``shape`` and ``scale`` are supported as scalar. + Parameters `shape` and `scale` are supported as scalar. Otherwise, :obj:`numpy.random.gamma(shape, scale, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -404,7 +405,7 @@ def geometric(p, size=None): Limitations ----------- - Parameter ``p`` is supported as a scalar. + Parameter `p` is supported as a scalar. Otherwise, :obj:`numpy.random.geometric(p, size)` samples are drawn. Output array data type is :obj:`dpnp.int32`. @@ -438,7 +439,7 @@ def gumbel(loc=0.0, scale=1.0, size=None): Limitations ----------- - Parameters ``loc`` and ``scale`` are supported as scalar. + Parameters `loc` and `scale` are supported as scalar. Otherwise, :obj:`numpy.random.gumbel(loc, scale, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -474,7 +475,7 @@ def hypergeometric(ngood, nbad, nsample, size=None): Limitations ----------- - Parameters ``ngood``, ``nbad`` and ``nsample`` are supported as scalar. + Parameters `ngood`, `nbad` and `nsample` are supported as scalar. Otherwise, :obj:`numpy.random.hypergeometric(shape, scale, size)` samples are drawn. Output array data type is :obj:`dpnp.int32`. @@ -526,7 +527,7 @@ def laplace(loc=0.0, scale=1.0, size=None): Limitations ----------- - Parameters ``loc`` and ``scale`` are supported as scalar. + Parameters `loc` and `scale` are supported as scalar. Otherwise, :obj:`numpy.random.laplace(loc, scale, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -561,7 +562,7 @@ def logistic(loc=0.0, scale=1.0, size=None): Limitations ----------- - Parameters ``loc`` and ``scale`` are supported as scalar. + Parameters `loc` and `scale` are supported as scalar. Otherwise, :obj:`numpy.random.logistic(loc, scale, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -600,7 +601,7 @@ def lognormal(mean=0.0, sigma=1.0, size=None): Limitations ----------- - Parameters ``mean`` and ``sigma`` are supported as scalar. + Parameters `mean` and `sigma` are supported as scalar. Otherwise, :obj:`numpy.random.lognormal(mean, sigma, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -654,7 +655,7 @@ def multinomial(n, pvals, size=None): Limitations ----------- - Parameter ``n`` limited with int32 max. See, `numpy.iinfo(numpy.int32).max`. + Parameter `n` limited with int32 max. See, `numpy.iinfo(numpy.int32).max`. Sum of ``pvals``, `sum(pvals)` should be between (0, 1). Otherwise, :obj:`numpy.random.multinomial(n, pvals, size)` samples are drawn. @@ -703,7 +704,7 @@ def multivariate_normal(mean, cov, size=None, check_valid="warn", tol=1e-8): Limitations ----------- - Parameters ``check_valid`` and ``tol`` are not supported. + Parameters `check_valid` and `tol` are not supported. Otherwise, :obj:`numpy.random.multivariate_normal(mean, cov, size, check_valid, tol)` samples are drawn. @@ -753,7 +754,7 @@ def negative_binomial(n, p, size=None): Limitations ----------- - Parameters ``n`` and ``p`` are supported as scalar. + Parameters `n` and `p` are supported as scalar. Otherwise, :obj:`numpy.random.negative_binomial(n, p, size)` samples are drawn. Output array data type is :obj:`dpnp.int32`. @@ -898,7 +899,7 @@ def pareto(a, size=None): Limitations ----------- - Parameter ``a`` is supported as a scalar. + Parameter `a` is supported as a scalar. Otherwise, :obj:`numpy.random.pareto(a, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -967,7 +968,7 @@ def poisson(lam=1.0, size=None): Limitations ----------- - Parameter ``lam`` is supported as a scalar. + Parameter `lam` is supported as a scalar. Otherwise, :obj:`numpy.random.poisson(lam, size)` samples are drawn. Output array data type is :obj:`dpnp.int32`. @@ -1002,7 +1003,7 @@ def power(a, size=None): Limitations ----------- - Parameter ``a`` is supported as a scalar. + Parameter `a` is supported as a scalar. Otherwise, :obj:`numpy.random.power(a, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -1380,7 +1381,7 @@ def rayleigh(scale=1.0, size=None): Limitations ----------- - Parameter ``scale`` is supported as a scalar. + Parameter `scale` is supported as a scalar. Otherwise, :obj:`numpy.random.rayleigh(scale, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -1586,7 +1587,7 @@ def standard_gamma(shape, size=None): Limitations ----------- - Parameter ``shape`` is supported as a scalar. + Parameter `shape` is supported as a scalar. Otherwise, :obj:`numpy.random.standard_gamma(shape, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -1659,7 +1660,7 @@ def standard_t(df, size=None): Limitations ----------- - Parameter ``df`` is supported as a scalar. + Parameter `df` is supported as a scalar. Otherwise, :obj:`numpy.random.standard_t(df, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -1695,7 +1696,7 @@ def triangular(left, mode, right, size=None): Limitations ----------- - Parameter ``left``, ``mode`` and ``right`` are supported as scalar. + Parameters `left`, `mode` and `right` are supported as scalar. Otherwise, :obj:`numpy.random.triangular(left, mode, right, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -1799,7 +1800,7 @@ def vonmises(mu, kappa, size=None): Limitations ----------- - Parameter ``mu`` and ``kappa`` are supported as scalar. + Parameters `mu` and `kappa` are supported as scalar. Otherwise, :obj:`numpy.random.vonmises(mu, kappa, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -1838,7 +1839,7 @@ def wald(mean, scale, size=None): Limitations ----------- - Parameters ``mean`` and ``scale`` are supported as scalar. + Parameters `mean` and `scale` are supported as scalar. Otherwise, :obj:`numpy.random.wald(mean, scale, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -1875,7 +1876,7 @@ def weibull(a, size=None): Limitations ----------- - Parameter ``a`` is supported as a scalar. + Parameter `a` is supported as a scalar. Otherwise, :obj:`numpy.random.weibull(a, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. @@ -1908,7 +1909,7 @@ def zipf(a, size=None): Limitations ----------- - Parameter ``a`` is supported as a scalar. + Parameter `a`` is supported as a scalar. Otherwise, :obj:`numpy.zipf.weibull(a, size)` samples are drawn. Output array data type is :obj:`dpnp.float64`. diff --git a/dpnp/to_numba/dpnp_iface_to_numba.py b/dpnp/to_numba/dpnp_iface_to_numba.py index 85499968d9ed..fc1ee2dbc10b 100644 --- a/dpnp/to_numba/dpnp_iface_to_numba.py +++ b/dpnp/to_numba/dpnp_iface_to_numba.py @@ -31,7 +31,7 @@ ----- This module represents DPNP Algo interface to Numba JIT -The code idea gathered from numba-scipy and needs to be syncronized with +The code idea gathered from numba-scipy and needs to be synchronized with https://github.com/numba/numba-scipy/blob/master/numba_scipy/special/ """ diff --git a/examples/example2.py b/examples/example2.py index 55408d3df499..9f0539be2dd8 100644 --- a/examples/example2.py +++ b/examples/example2.py @@ -27,11 +27,11 @@ """Example 2. -This example shows usage of diffrent input data types +This example shows usage of different input data types with same third party library call Also, it produces performance comparison between a same third party function call -over diffrent types of input data +over different types of input data """ diff --git a/examples/example4.py b/examples/example4.py index 967d30600b99..19adde92bfc7 100644 --- a/examples/example4.py +++ b/examples/example4.py @@ -58,7 +58,7 @@ data = numpy.array([1, 2, 3, 4], dtype=test_type) result = function(data) print( - f"input:{data.dtype.name:10}: outout:{result.dtype.name:10}: name:{function.__name__}" + f"input:{data.dtype.name:10}: output:{result.dtype.name:10}: name:{function.__name__}" ) """ diff --git a/scripts/install_system_deps_win.bat b/scripts/install_system_deps_win.bat index 28975bccacd1..1baf9e663918 100644 --- a/scripts/install_system_deps_win.bat +++ b/scripts/install_system_deps_win.bat @@ -87,7 +87,7 @@ start /b /wait webimage.exe -s -x -f webimage_extracted del webimage.exe echo ========================= install onepai ================================= -:: it is expected that multy-line end-line symbol will be diffrent on MS :-) +:: it is expected that multy-line end-line symbol will be different on MS :-) call webimage_extracted\bootstrapper.exe -s --action install ^ --eula=accept ^ --continue-with-optional-error=yes ^ diff --git a/tests/third_party/cupy/math_tests/test_arithmetic.py b/tests/third_party/cupy/math_tests/test_arithmetic.py index 23691ac9baff..6c0dea517508 100644 --- a/tests/third_party/cupy/math_tests/test_arithmetic.py +++ b/tests/third_party/cupy/math_tests/test_arithmetic.py @@ -210,7 +210,7 @@ def check_binary(self, xp): if dtype1 in (numpy.float16, numpy.float32): y = y.astype(numpy.complex64) - # NumPy returns an output array of another type than DPNP when input ones have diffrent types. + # NumPy returns an output array of another type than DPNP when input ones have different types. if xp is numpy and dtype1 != dtype2: is_array_arg1 = not xp.isscalar(arg1) is_array_arg2 = not xp.isscalar(arg2) diff --git a/tests/third_party/cupy/testing/helper.py b/tests/third_party/cupy/testing/helper.py index 9cf8403cdf2d..3d239c273a60 100644 --- a/tests/third_party/cupy/testing/helper.py +++ b/tests/third_party/cupy/testing/helper.py @@ -1176,7 +1176,7 @@ def for_signed_dtypes(name="dtype"): def for_unsigned_dtypes(name="dtype"): - """Decorator that checks the fixture with unsinged dtypes. + """Decorator that checks the fixture with unsigned dtypes. Args: name(str): Argument name to which specified dtypes are passed.