MCPcopy
hub / github.com/dask/dask / tril

Function tril

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

Source from the content-addressed store, hash-verified

2564
2565@derived_from(np)
2566def tril(m, k=0):
2567 m = asarray_safe(m, like=m)
2568 mask = tri(
2569 *m.shape[-2:],
2570 k=k,
2571 dtype=bool,
2572 chunks=m.chunks[-2:],
2573 like=meta_from_array(m),
2574 )
2575
2576 return where(mask, m, np.zeros_like(m, shape=(1,)))
2577
2578
2579@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…