Version of np.max which ignores size 0 arrays
(x, axis=None, keepdims=None)
| 142 | |
| 143 | |
| 144 | def chunk_max(x, axis=None, keepdims=None): |
| 145 | """Version of np.max which ignores size 0 arrays""" |
| 146 | if x.size == 0: |
| 147 | return array_safe([], x, ndmin=x.ndim, dtype=x.dtype) |
| 148 | else: |
| 149 | return np.max(x, axis=axis, keepdims=keepdims) |
| 150 | |
| 151 | |
| 152 | @derived_from(np) |
nothing calls this directly
no test coverage detected
searching dependent graphs…