|
1 | 1 | [ |
2 | 2 | { |
3 | | - "test": "dense_matrix = [\n [0, 0, 0],\n [0, 0, 0],\n [0, 0, 0]\n]\nvals, row_idx, col_ptr = compressed_col_sparse_matrix(dense_matrix)\nprint(vals)", |
4 | | - "expected_output": "[]" |
| 3 | + "test": "dense_matrix = [\n [0, 0, 0],\n [0, 0, 0],\n [0, 0, 0]\n]\nvals, row_idx, col_ptr = compressed_col_sparse_matrix(dense_matrix)\nprint(vals)\nprint(row_idx)\nprint(col_ptr)", |
| 4 | + "expected_output": "[]\n[]\n[0, 0, 0, 0]" |
5 | 5 | }, |
6 | 6 | { |
7 | | - "test": "dense_matrix = [\n [0, 0, 0],\n [1, 2, 0],\n [0, 3, 4]\n]\nvals, row_idx, col_ptr = compressed_col_sparse_matrix(dense_matrix)\nprint(vals)", |
8 | | - "expected_output": "[1, 2, 3, 4]" |
| 7 | + "test": "dense_matrix = [\n [0, 0, 0],\n [1, 2, 0],\n [0, 3, 4]\n]\nvals, row_idx, col_ptr = compressed_col_sparse_matrix(dense_matrix)\nprint(vals)\nprint(row_idx)\nprint(col_ptr)", |
| 8 | + "expected_output": "[1, 2, 3, 4]\n[1, 1, 2, 2]\n[0, 1, 3, 4]" |
9 | 9 | }, |
10 | 10 | { |
11 | | - "test": "dense_matrix = [\n [0, 0, 3, 0, 0],\n [0, 4, 0, 0, 0],\n [5, 0, 0, 6, 0],\n [0, 0, 0, 0, 0],\n [0, 7, 0, 0, 8]\n]\nvals, row_idx, col_ptr = compressed_col_sparse_matrix(dense_matrix)\nprint(vals)", |
12 | | - "expected_output": "[5, 4, 7, 3, 6, 8]" |
| 11 | + "test": "dense_matrix = [\n [0, 0, 3, 0, 0],\n [0, 4, 0, 0, 0],\n [5, 0, 0, 6, 0],\n [0, 0, 0, 0, 0],\n [0, 7, 0, 0, 8]\n]\nvals, row_idx, col_ptr = compressed_col_sparse_matrix(dense_matrix)\nprint(vals)\nprint(row_idx)\nprint(col_ptr)", |
| 12 | + "expected_output": "[5, 4, 7, 3, 6, 8]\n[2, 1, 4, 0, 2, 4]\n[0, 1, 3, 4, 5, 6]" |
13 | 13 | } |
14 | 14 | ] |
0 commit comments