(m, k=0)
| 2530 | |
| 2531 | @derived_from(np) |
| 2532 | def triu(m, k=0): |
| 2533 | m = asarray_safe(m, like=m) |
| 2534 | mask = tri( |
| 2535 | *m.shape[-2:], |
| 2536 | k=k - 1, |
| 2537 | dtype=bool, |
| 2538 | chunks=m.chunks[-2:], |
| 2539 | like=meta_from_array(m), |
| 2540 | ) |
| 2541 | |
| 2542 | return where(mask, np.zeros_like(m, shape=(1,)), m) |
| 2543 | |
| 2544 | |
| 2545 | @derived_from(np) |
nothing calls this directly
no test coverage detected