MCPcopy Create free account
hub / github.com/dask/dask / nanvar

Function nanvar

dask/array/reductions.py:661–687  ·  view source on GitHub ↗
(
    a, axis=None, dtype=None, keepdims=False, ddof=0, split_every=None, out=None
)

Source from the content-addressed store, hash-verified

659
660@derived_from(np)
661def nanvar(
662 a, axis=None, dtype=None, keepdims=False, ddof=0, split_every=None, out=None
663):
664 if dtype is not None:
665 dt = dtype
666 else:
667 dt = getattr(np.var(np.ones(shape=(1,), dtype=a.dtype)), "dtype", object)
668
669 implicit_complex_dtype = dtype is None and np.iscomplexobj(a)
670
671 return reduction(
672 a,
673 partial(
674 moment_chunk,
675 sum=chunk.nansum,
676 numel=nannumel,
677 implicit_complex_dtype=implicit_complex_dtype,
678 ),
679 partial(moment_agg, sum=np.nansum, ddof=ddof),
680 axis=axis,
681 keepdims=keepdims,
682 dtype=dt,
683 split_every=split_every,
684 combine=partial(moment_combine, sum=np.nansum),
685 out=out,
686 concatenate=False,
687 )
688
689
690def _sqrt(a):

Callers 1

nanstdFunction · 0.85

Calls 3

reductionFunction · 0.90
varMethod · 0.45
onesMethod · 0.45

Tested by

no test coverage detected