Skip to content

Commit e1dcc45

Browse files
vtavanaantonwolfy
andauthored
call dpnp.kron and dpnp.dot for special cases in dpnp_matmul (#1815)
* reorganize the structure of dpnp_matmul function reorganizing for easier future code development calling dpnp.kron and dpnp.dot for special cases in dpnp.matmul * address comments * improve coverage * fix pre-commit --------- Co-authored-by: Anton <[email protected]>
1 parent 362a73a commit e1dcc45

File tree

6 files changed

+347
-178
lines changed

6 files changed

+347
-178
lines changed

dpnp/dpnp_iface_histograms.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ def _get_bin_edges(a, bins, range, usm_type):
173173
# numpy's gh-10322 means that type resolution rules are dependent on
174174
# array shapes. To avoid this causing problems, we pick a type now and
175175
# stick with it throughout.
176+
# pylint: disable=possibly-used-before-assignment
176177
bin_type = dpnp.result_type(first_edge, last_edge, a)
177178
if dpnp.issubdtype(bin_type, dpnp.integer):
178179
bin_type = dpnp.result_type(
@@ -332,6 +333,7 @@ def histogram(a, bins=10, range=None, density=None, weights=None):
332333

333334
if density:
334335
db = dpnp.diff(bin_edges).astype(dpnp.default_float_type())
336+
# pylint: disable=possibly-used-before-assignment
335337
return n / db / n.sum(), bin_edges
336338

337339
return n, bin_edges

0 commit comments

Comments
 (0)