Skip to content

Commit c41d728

Browse files
committed
Add a sysynchronization warning to docstring of histogram-like functions
1 parent cc0e365 commit c41d728

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

dpnp/dpnp_iface_histograms.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,11 @@ def bincount(x, weights=None, minlength=0):
313313
314314
For full documentation refer to :obj:`numpy.bincount`.
315315
316+
Warning
317+
-------
318+
This function synchronizes in order to calculate binning edges.
319+
This may harm performance in some applications.
320+
316321
Parameters
317322
----------
318323
x : {dpnp.ndarray, usm_ndarray}
@@ -506,6 +511,11 @@ def histogram(a, bins=10, range=None, density=None, weights=None):
506511
507512
For full documentation refer to :obj:`numpy.histogram`.
508513
514+
Warning
515+
-------
516+
This function may synchronize in order to check a monotonically increasing
517+
array of bin edges. This may harm performance in some applications.
518+
509519
Parameters
510520
----------
511521
a : {dpnp.ndarray, usm_ndarray}
@@ -672,6 +682,11 @@ def histogram_bin_edges(a, bins=10, range=None, weights=None):
672682
673683
For full documentation refer to :obj:`numpy.histogram_bin_edges`.
674684
685+
Warning
686+
-------
687+
This function may synchronize in order to check a monotonically increasing
688+
array of bin edges. This may harm performance in some applications.
689+
675690
Parameters
676691
----------
677692
a : {dpnp.ndarray, usm_ndarray}
@@ -757,6 +772,13 @@ def histogram2d(x, y, bins=10, range=None, density=None, weights=None):
757772
"""
758773
Compute the bi-dimensional histogram of two data samples.
759774
775+
For full documentation refer to :obj:`numpy.histogram2d`.
776+
777+
Warning
778+
-------
779+
This function may synchronize in order to check a monotonically increasing
780+
array of bin edges. This may harm performance in some applications.
781+
760782
Parameters
761783
----------
762784
x : {dpnp.ndarray, usm_ndarray} of shape (N,)
@@ -1085,6 +1107,11 @@ def histogramdd(sample, bins=10, range=None, density=None, weights=None):
10851107
10861108
For full documentation refer to :obj:`numpy.histogramdd`.
10871109
1110+
Warning
1111+
-------
1112+
This function may synchronize in order to check a monotonically increasing
1113+
array of bin edges. This may harm performance in some applications.
1114+
10881115
Parameters
10891116
----------
10901117
sample : {dpnp.ndarray, usm_ndarray}

0 commit comments

Comments
 (0)