MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / _clip

Function _clip

pyxrf/core/map_processing.py:1308–1312  ·  view source on GitHub ↗

`np.clip` is not supported by numba, but the following works

(arr, vmin, vmax)

Source from the content-addressed store, hash-verified

1306 index = np.arange(n_background)
1307
1308 def _clip(arr, vmin, vmax):
1309 """`np.clip` is not supported by numba, but the following works"""
1310 arr[arr < vmin] = vmin
1311 arr[arr > vmax] = vmax
1312 return arr
1313
1314 v_xmin, v_xmax = max(xmin, 0), min(xmax, n_background - 1)
1315

Callers 1

snip_method_numbaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected