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