Skip to content

Commit c621a74

Browse files
Update _funcs.py
Co-authored-by: Quentin Barthélemy <q.barthelemy@gmail.com>
1 parent c0a20b0 commit c621a74

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/array_api_extra/_lib/_funcs.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,9 @@ def cov(
299299
m = atleast_nd(m, ndim=2, xp=xp)
300300
m = xp.astype(m, dtype)
301301

302-
fw = (
303-
None
304-
if frequency_weights is None
305-
else xp.astype(xp.asarray(frequency_weights), dtype)
306-
)
302+
fw = None
303+
if frequency_weights is not None:
304+
fw = xp.astype(xp.asarray(frequency_weights), dtype)
307305
aw = None if weights is None else xp.astype(xp.asarray(weights), dtype)
308306
if fw is None and aw is None:
309307
w = None

0 commit comments

Comments
 (0)