@@ -763,12 +763,13 @@ def histogram2d(x, y, bins=10, range=None, density=None, weights=None):
763
763
Parameters
764
764
----------
765
765
x : {dpnp.ndarray, usm_ndarray} of shape (N,)
766
- An array containing the x coordinates of the points to be
766
+ An array containing the `x` coordinates of the points to be
767
767
histogrammed.
768
768
y : {dpnp.ndarray, usm_ndarray} of shape (N,)
769
- An array containing the y coordinates of the points to be
769
+ An array containing the `y` coordinates of the points to be
770
770
histogrammed.
771
- bins : {int, list of dpnp.ndarray or usm_ndarray, sequence of scalars}, optional
771
+ bins : {int, list of dpnp.ndarray or usm_ndarray, sequence of scalars}, \
772
+ optional
772
773
Histogram bins.
773
774
774
775
The bins specification:
@@ -788,19 +789,19 @@ def histogram2d(x, y, bins=10, range=None, density=None, weights=None):
788
789
(if not specified explicitly in the `bins` parameters):
789
790
``[[xmin, xmax], [ymin, ymax]]``. All values outside of this range
790
791
will be considered outliers and not tallied in the histogram.
791
- density : bool, optional
792
+ density : {None, bool} , optional
792
793
If ``False``, the default, returns the number of samples in each bin.
793
794
If ``True``, returns the probability *density* function at the bin,
794
795
``bin_count / sample_count / bin_area``.
795
- weights : {dpnp.ndarray, usm_ndarray} of shape(N,), optional
796
+ weights : {dpnp.ndarray, usm_ndarray} of shape (N,), optional
796
797
An array of values ``w_i`` weighing each sample ``(x_i, y_i)``.
797
- Weights are normalized to 1 if `density` is True. If `density` is
798
- False, the values of the returned histogram are equal to the sum of
798
+ Weights are normalized to ``1`` if `density` is `` True`` . If `density` is
799
+ `` False`` , the values of the returned histogram are equal to the sum of
799
800
the weights belonging to the samples falling into each bin.
800
801
801
802
Returns
802
803
-------
803
- H : ndarray, shape(nx, ny)
804
+ H : dpnp. ndarray of shape (nx, ny)
804
805
The bi-dimensional histogram of samples `x` and `y`. Values in `x`
805
806
are histogrammed along the first dimension and values in `y` are
806
807
histogrammed along the second dimension.
@@ -816,15 +817,15 @@ def histogram2d(x, y, bins=10, range=None, density=None, weights=None):
816
817
817
818
Notes
818
819
-----
819
- When `density` is True, then the returned histogram is the sample
820
+ When `density` is `` True`` , then the returned histogram is the sample
820
821
density, defined such that the sum over bins of the product
821
822
``bin_value * bin_area`` is 1.
822
823
823
824
Please note that the histogram does not follow the Cartesian convention
824
825
where `x` values are on the abscissa and `y` values on the ordinate
825
- axis. Rather, `x` is histogrammed along the first dimension of the
826
+ axis. Rather, `x` is histogrammed along the first dimension of the
826
827
array (vertical), and `y` along the second dimension of the array
827
- (horizontal). This ensures compatibility with `histogramdd`.
828
+ (horizontal). This ensures compatibility with `histogramdd`.
828
829
829
830
Examples
830
831
--------
0 commit comments