Skip to content

Commit

Permalink
Applied review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
antonwolfy committed May 23, 2023
1 parent 5b7ba6d commit 5f37077
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dpnp/dpnp_utils/dpnp_utils_statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,26 +48,26 @@
def dpnp_cov(m, y=None, rowvar=True, dtype=None):
"""
Estimate a covariance matrix based on passed data.
No support for given wights is provided now.
No support for given weights is provided now.
The implementation is done though existing dpnp and dpctl methods
The implementation is done through existing dpnp and dpctl methods
instead of separate function call of dnpn backend.
"""

def _get_2dmin_array(x, dtype):
"""
Transfor an input array to a form required for building a covariance matrix.
Transform an input array to a form required for building a covariance matrix.
If applicable, it resahpes the imput array to have 2 dimensions or greater.
If applicable, it transposes the imput array when 'rowvar' is False.
If applicable, it reshapes the input array to have 2 dimensions or greater.
If applicable, it transposes the input array when 'rowvar' is False.
It casts to another dtype, if the input array differs from requested one.
"""

if x.ndim == 0:
x = x.reshape((1, 1))
elif m.ndim == 1:
elif x.ndim == 1:
x = x[dpnp.newaxis, :]

if not rowvar and x.shape[0] != 1:
Expand Down

0 comments on commit 5f37077

Please sign in to comment.