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

Function nanvar

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

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

Callers 1

nanstdFunction · 0.85

Calls 3

reductionFunction · 0.90
varMethod · 0.45
onesMethod · 0.45

Tested by

no test coverage detected