Skip to content

tosparse_u32

tosparse_u32(img, msk, row, col, val, cut)

Categories: Sparse

Description

Convert dense uint32 image to sparse COO.

Parameters

Name Description
col Output cols.
cut Threshold (float).
img Input uint32 2D.
msk Mask (uint8).
row Output rows.
val Output values.

Constraints

  • (img.format == 'I' or img.format == 'L') and img.itemsize == 4
  • img.ndim == 2
  • img.slow_axis == 0
  • msk.format == 'B' or msk.format == 'b' or msk.format == '?'
  • msk.n == img.n
  • row.format == 'H' or row.itemsize == 2
  • col.format == 'H' or col.itemsize == 2
  • val.format == 'I' or val.itemsize == 4

Overloads

C function Condition
tosparse_u32 always

Built from commit 7ba8255fa8d680e1a1df79e67aee3873247ce69c (v0.4.5)