mask_to_coo
mask_to_coo(msk, i, j, w)
Categories: Image corrections, Sparse
Description
takes a mask and converts it to a list of i,j coordinates in a sparse array coo format returns : 0 => success 1 => ns out of range ; 2 => nf out of range 3 => nnz < 1 empty mask 4 => nnz did not match this mask
Parameters
| Name | Description |
|---|---|
i |
Output row indices (uint16). |
j |
Output col indices (uint16). |
msk |
Input int8 2D mask. |
w |
Output per-row counts (int32). |
Constraints
msk.format == 'b' or msk.format == 'B'msk.ndim == 2msk.slow_axis == 0i.format == 'H' or i.itemsize == 2j.format == 'H' or j.itemsize == 2j.n == i.n( w.format == 'i' or w.format == 'l' )w.n == msk.shape[0]
Overloads
| C function | Condition |
|---|---|
mask_to_coo |
always |
Built from commit 7ba8255fa8d680e1a1df79e67aee3873247ce69c (v0.4.5)