Function
nanmean
(a, axis=None, dtype=None, keepdims=False, split_every=None, out=None)
Source from the content-addressed store, hash-verified
| 406 | |
| 407 | @derived_from(np) |
| 408 | def nanmean(a, axis=None, dtype=None, keepdims=False, split_every=None, out=None): |
| 409 | if dtype is not None: |
| 410 | dt = dtype |
| 411 | else: |
| 412 | dt = getattr(np.mean(np.ones(shape=(1,), dtype=a.dtype)), "dtype", object) |
| 413 | return reduction( |
| 414 | a, |
| 415 | partial(mean_chunk, sum=chunk.nansum, numel=nannumel), |
| 416 | mean_agg, |
| 417 | axis=axis, |
| 418 | keepdims=keepdims, |
| 419 | dtype=dt, |
| 420 | split_every=split_every, |
| 421 | out=out, |
| 422 | concatenate=False, |
| 423 | combine=partial(mean_combine, sum=chunk.nansum, numel=nannumel), |
| 424 | ) |
| 425 | |
| 426 | |
| 427 | def moment_chunk( |
Callers
nothing calls this directly
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…