ComfyUI Node
Parse Matrix
Parses a delimited text table into a 2-D numpy matrix. Spaces, tabs, commas or semicolons separate columns, newlines separate rows; consecutive separators are collapsed. Reads back everything 'CV Array To Text' writes (that is the round trip: format -> 'Basic data handling: save STRING to file' -> load -> parse). Rejects ragged rows (varying column counts).
Parse Matrix
- nparray
◄text1 2 3
4 5 6►
◄dtypesame as input►
◄transposefalse►
◄skip_rows0►
Categoryimage/CV/low-level
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | 1 2 3 4 5 6 | Matrix data: spaces, tabs, commas or semicolons separate columns, newlines separate rows. Consecutive separators are collapsed. |
| dtypeopt | COMBO | same as input | Output array depth. 'same as input' defaults to CV_64F (float64). |
| transposeopt | BOOLEAN | false | Swap rows and columns (transpose the matrix). |
| skip_rowsopt | INT | 00–1024 | Drop this many leading lines before parsing - 1 skips a CSV header row (a header is text, so parsing one as numbers raises). Blank lines never count. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| nparray | NPARRAY | Parsed 2-D numpy matrix. |