diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4d8e006524c9..4ade259ec73b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,7 +52,7 @@ repos: - id: rst-inline-touching-normal - id: text-unicode-replacement-char - repo: https://github.com/asottile/pyupgrade - rev: v3.21.2 + rev: v3.22.0 hooks: - id: pyupgrade - repo: https://github.com/codespell-project/codespell @@ -63,7 +63,7 @@ repos: additional_dependencies: - tomli - repo: https://github.com/psf/black - rev: 26.5.1 + rev: 26.10.1 hooks: - id: black exclude: "dpnp/_version.py" @@ -88,7 +88,7 @@ repos: - flake8-docstrings==1.7.0 - flake8-bugbear==26.9.30 - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v23.1.2 + rev: v23.1.3 hooks: - id: clang-format args: ["-i"] @@ -133,7 +133,7 @@ repos: exclude: "dpnp/backend/cmake/Modules/" args: ["-i", "-l", "88", "--no-warn-about-unknown-commands"] - repo: https://github.com/MarcoGorelli/cython-lint - rev: v0.21.1 + rev: v0.22.0 hooks: - id: cython-lint - id: double-quote-cython-strings diff --git a/dpnp/dpnp_algo/dpnp_algo.pxd b/dpnp/dpnp_algo/dpnp_algo.pxd index e83b6b588592..2ac2a0a04531 100644 --- a/dpnp/dpnp_algo/dpnp_algo.pxd +++ b/dpnp/dpnp_algo/dpnp_algo.pxd @@ -97,8 +97,6 @@ cdef extern from "dpnp_iface_fptr.hpp": ) except + -""" -Internal functions -""" +# Internal functions cdef DPNPFuncType dpnp_dtype_to_DPNPFuncType(dtype) cdef dpnp_DPNPFuncType_to_dtype(size_t type) diff --git a/dpnp/dpnp_utils/dpnp_algo_utils.pxd b/dpnp/dpnp_utils/dpnp_algo_utils.pxd index 3d0ff12621b2..7b99aec3dd32 100644 --- a/dpnp/dpnp_utils/dpnp_algo_utils.pxd +++ b/dpnp/dpnp_utils/dpnp_algo_utils.pxd @@ -34,29 +34,24 @@ from dpnp.dpnp_algo cimport shape_type_c from dpnp.dpnp_algo.dpnp_algo cimport DPNPFuncType +# Throw exception ValueError if 'param' is not 'expected' cpdef checker_throw_value_error(function_name, param_name, param, expected) -""" Throw exception ValueError if 'param' is not 'expected' - -""" +# Throw exception TypeError if 'given_type' type is not supported cpdef checker_throw_type_error(function_name, given_type) -""" Throw exception TypeError if 'given_type' type is not supported - -""" +# This function needs to redirect particular computation cases to original +# backend +# +# Parameters: +# input1: One of the input parameter of the API function +# compute_size: Some amount of total compute size of the task +# Return: +# True - computations are better to be executed on original backend +# False - it is better to use this SW to compute cpdef cpp_bool use_origin_backend(input1=*, size_t compute_size=*) -""" -This function needs to redirect particular computation cases to original backend - -Parameters: - input1: One of the input parameter of the API function - compute_size: Some amount of total compute size of the task -Return: - True - computations are better to be executed on original backend - False - it is better to use this SW to compute -""" cpdef tuple _object_to_tuple(object obj) @@ -73,17 +68,13 @@ cdef class dpnp_descriptor: cdef void * get_data(self) +# Create output dpnp_descriptor based on shape, type and 'out' parameters cdef dpnp_descriptor create_output_descriptor(shape_type_c output_shape, DPNPFuncType c_type, dpnp_descriptor requested_out, device=*, usm_type=*, sycl_queue=*) -""" -Create output dpnp_descriptor based on shape, type and 'out' parameters -""" +# Get common USM allocation in the form of (sycl_device, usm_type, sycl_queue) cdef tuple get_common_usm_allocation(dpnp_descriptor x1, dpnp_descriptor x2) -""" -Get common USM allocation in the form of (sycl_device, usm_type, sycl_queue) -""" diff --git a/dpnp/tests/third_party/cupy/statistics_tests/test_histogram.py b/dpnp/tests/third_party/cupy/statistics_tests/test_histogram.py index cfaeeecf55a3..f014dd0dff8c 100644 --- a/dpnp/tests/third_party/cupy/statistics_tests/test_histogram.py +++ b/dpnp/tests/third_party/cupy/statistics_tests/test_histogram.py @@ -665,7 +665,7 @@ def test_histogramdd(self, xp, dtype): ) return [ y, - ] + [e for e in bin_edges] + ] + [*bin_edges] class TestHistogramddErrors(unittest.TestCase):