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

Function chunk_max

dask/array/reductions.py:142–147  ·  view source on GitHub ↗

Version of np.max which ignores size 0 arrays

(x, axis=None, keepdims=None)

Source from the content-addressed store, hash-verified

140
141
142def chunk_max(x, axis=None, keepdims=None):
143 """Version of np.max which ignores size 0 arrays"""
144 if x.size == 0:
145 return array_safe([], x, ndmin=x.ndim, dtype=x.dtype)
146 else:
147 return np.max(x, axis=axis, keepdims=keepdims)
148
149
150@derived_from(np)

Callers

nothing calls this directly

Calls 2

array_safeFunction · 0.90
maxMethod · 0.45

Tested by

no test coverage detected