MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _vector_magnitude

Function _vector_magnitude

lib/matplotlib/colors.py:3784–3791  ·  view source on GitHub ↗
(arr)

Source from the content-addressed store, hash-verified

3782
3783
3784def _vector_magnitude(arr):
3785 # things that don't work here:
3786 # * np.linalg.norm: drops mask from ma.array
3787 # * np.sum: drops mask from ma.array unless entire vector is masked
3788 sum_sq = 0
3789 for i in range(arr.shape[-1]):
3790 sum_sq += arr[..., i, np.newaxis] ** 2
3791 return np.sqrt(sum_sq)
3792
3793
3794class LightSource:

Callers 1

hillshadeMethod · 0.85

Calls 1

sqrtMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…