Skip to content

Commit 852f7a3

Browse files
committed
Handle rowvar and y properly
1 parent 2b8ab4b commit 852f7a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

dpnp/dpnp_utils/dpnp_utils_statistics.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ def dpnp_cov(
139139
)
140140

141141
if y is not None:
142+
y_ndim = y.ndim
142143
y = dpnp.array(y, copy=None, ndmin=2, dtype=dtype)
144+
if not rowvar and y_ndim != 1:
145+
y = y.T
143146
x = dpnp.concatenate((x, y), axis=0)
144147

145148
# get the product of frequencies and weights

0 commit comments

Comments
 (0)