MCPcopy
hub / github.com/dask/dask / triu

Function triu

dask/array/routines.py:2580–2590  ·  view source on GitHub ↗
(m, k=0)

Source from the content-addressed store, hash-verified

2578
2579@derived_from(np)
2580def triu(m, k=0):
2581 m = asarray_safe(m, like=m)
2582 mask = tri(
2583 *m.shape[-2:],
2584 k=k - 1,
2585 dtype=bool,
2586 chunks=m.chunks[-2:],
2587 like=meta_from_array(m),
2588 )
2589
2590 return where(mask, np.zeros_like(m, shape=(1,)), m)
2591
2592
2593@derived_from(np)

Callers

nothing calls this directly

Calls 4

asarray_safeFunction · 0.90
triFunction · 0.90
meta_from_arrayFunction · 0.90
whereFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…