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

Function nanvar

dask/array/reductions.py:662–688  ·  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

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

Callers 1

nanstdFunction · 0.85

Calls 3

reductionFunction · 0.90
varMethod · 0.45
onesMethod · 0.45

Tested by

no test coverage detected