tril
Returns an array with all elements above the k-th diagonal set to zero.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x
|
COO
|
The input array. |
required |
k
|
int
|
The diagonal above which elements are set to zero. The default is zero, which corresponds to the main diagonal. |
0
|
Returns:
Type | Description |
---|---|
COO
|
The output lower-triangular matrix. |
Raises:
Type | Description |
---|---|
ValueError
|
If |
See Also
numpy.tril
: NumPy equivalent function
Source code in sparse/numba_backend/_coo/common.py
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
|