@@ -332,7 +332,7 @@ def _result_type(dtype1, dtype2, has_fp64):
332332def _align_dtypes (a_dtype , bins_dtype , ntype , has_fp64 ):
333333 a_bin_dtype = _result_type (a_dtype , bins_dtype , has_fp64 )
334334
335- supported_types = (dpnp .float32 , dpnp .int64 , dpnp .uint64 , dpnp .complex64 )
335+ supported_types = (dpnp .float32 , dpnp .int64 , numpy .uint64 , dpnp .complex64 )
336336 if has_fp64 :
337337 supported_types += (dpnp .float64 , dpnp .complex128 )
338338
@@ -341,7 +341,7 @@ def _align_dtypes(a_dtype, bins_dtype, ntype, has_fp64):
341341
342342 a_bin_dtype = _find_supported_dtype (a_bin_dtype , supported_types )
343343 hist_dtype = _find_supported_dtype (ntype , supported_types )
344- if hist_dtype == dpnp .uint64 :
344+ if hist_dtype == numpy .uint64 :
345345 hist_dtype = dpnp .int64
346346
347347 if (a_bin_dtype in float_types and hist_dtype in float_types ) or (
@@ -522,7 +522,9 @@ def histogram(a, bins=10, range=None, density=None, weights=None):
522522
523523 if density :
524524 # pylint: disable=possibly-used-before-assignment
525- db = dpnp .diff (bin_edges ).astype (dpnp .default_float_type ())
525+ db = dpnp .diff (bin_edges ).astype (
526+ dpnp .default_float_type (sycl_queue = queue )
527+ )
526528 return n / db / n .sum (), bin_edges
527529
528530 return n , bin_edges
0 commit comments