@@ -87,8 +87,8 @@ def cov(
8787 * ,
8888 axis : int = - 1 ,
8989 correction : int | float = 1 ,
90- frequency_weights : Array | None = None ,
91- weights : Array | None = None ,
90+ fweights : Array | None = None ,
91+ aweights : Array | None = None ,
9292 xp : ModuleType | None = None ,
9393) -> Array :
9494 """
@@ -126,12 +126,12 @@ def cov(
126126 ``correction`` in ``numpy.var``/``std`` and ``torch.cov``.
127127 fweights : array, optional
128128 1-D array of integer frequency weights: the number of times each
129- observation is repeated. Corresponds to ``fweights`` in
129+ observation is repeated. Same as ``fweights`` in
130130 ``numpy.cov``/``torch.cov``.
131131 aweights : array, optional
132132 1-D array of observation-vector weights (analytic weights). Larger
133- values mark more important observations. Corresponds to
134- ``aweights`` in `` numpy.cov``/``torch.cov``.
133+ values mark more important observations. Same as ``aweights`` in
134+ ``numpy.cov``/``torch.cov``.
135135 xp : array_namespace, optional
136136 The standard-compatible namespace for `m`. Default: infer.
137137
@@ -149,8 +149,8 @@ def cov(
149149 numpy.cov(m, rowvar=False) -> cov(m, axis=-2)
150150 numpy.cov(m, bias=True) -> cov(m, correction=0)
151151 numpy.cov(m, ddof=k) -> cov(m, correction=k)
152- numpy.cov(m, fweights=f) -> cov(m, frequency_weights =f)
153- numpy.cov(m, aweights=a) -> cov(m, weights =a)
152+ numpy.cov(m, fweights=f) -> cov(m, fweights =f)
153+ numpy.cov(m, aweights=a) -> cov(m, aweights =a)
154154
155155 Unlike ``numpy.cov``, a ``RuntimeWarning`` for non-positive effective
156156 degrees of freedom is only emitted on the unweighted path. The
@@ -226,12 +226,12 @@ def cov(
226226 # requires integer `correction`. For non-integer-valued `correction`,
227227 # fall through to the generic implementation.
228228 integer_correction = isinstance (correction , int ) or correction .is_integer ()
229- has_weights = frequency_weights is not None or weights is not None
229+ has_weights = fweights is not None or aweights is not None
230230
231231 if m .ndim <= 2 and integer_correction :
232232 if is_torch_namespace (xp ):
233- fw = None if frequency_weights is None else xp .asarray (frequency_weights )
234- aw = None if weights is None else xp .asarray (weights )
233+ fw = None if fweights is None else xp .asarray (fweights )
234+ aw = None if aweights is None else xp .asarray (aweights )
235235 return xp .cov (m , correction = int (correction ), fweights = fw , aweights = aw )
236236 # `dask.array.cov` forces `.compute()` whenever weights are given:
237237 # its internal `if fact <= 0` check on a lazy 0-D scalar triggers
@@ -246,15 +246,15 @@ def cov(
246246 return xp .cov (
247247 m ,
248248 ddof = int (correction ),
249- fweights = frequency_weights ,
250- aweights = weights ,
249+ fweights = fweights ,
250+ aweights = aweights ,
251251 )
252252
253253 return _funcs .cov (
254254 m ,
255255 correction = correction ,
256- frequency_weights = frequency_weights ,
257- weights = weights ,
256+ fweights = fweights ,
257+ aweights = aweights ,
258258 xp = xp ,
259259 )
260260
0 commit comments