Skip to content

Commit 3f0e79c

Browse files
committed
No need to print function name while raising ValueError exception
1 parent 3ae94c3 commit 3f0e79c

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

dpnp/dpnp_iface_histograms.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -391,10 +391,8 @@ def bincount(x, weights=None, minlength=0):
391391

392392
if x_casted_dtype is None or ntype_casted is None: # pragma: no cover
393393
raise ValueError(
394-
f"function '{bincount}' does not support input types "
395-
f"({x.dtype}, {ntype}), "
396-
"and the inputs could not be coerced to any "
397-
"supported types"
394+
f"Input types ({x.dtype}, {ntype}) are not supported, "
395+
"and the inputs could not be coerced to any supported types"
398396
)
399397

400398
x_casted = dpnp.asarray(x, dtype=x_casted_dtype, order="C")
@@ -611,9 +609,8 @@ def histogram(a, bins=10, range=None, density=None, weights=None):
611609

612610
if a_bin_dtype is None or hist_dtype is None: # pragma: no cover
613611
raise ValueError(
614-
f"function '{histogram}' does not support input types "
615-
f"({a.dtype}, {bin_edges.dtype}, {ntype}), "
616-
"and the inputs could not be coerced to any "
612+
f"Input types ({a.dtype}, {bin_edges.dtype}, {ntype}) "
613+
"are not supported, and the inputs could not be coerced to any "
617614
"supported types"
618615
)
619616

0 commit comments

Comments
 (0)