Skip to content

Commit 80e1229

Browse files
committed
Update to use number_of_stored_values instead of nnz
1 parent 2c2b23a commit 80e1229

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

include/binsparse/read_matrix.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ bsp_matrix_t bsp_read_matrix_from_group(hid_t f) {
3535

3636
matrix.format = format;
3737

38-
cJSON* nnz_ = cJSON_GetObjectItemCaseSensitive(binsparse, "nnz");
38+
cJSON* nnz_ =
39+
cJSON_GetObjectItemCaseSensitive(binsparse, "number_of_stored_values");
3940
assert(nnz_ != NULL);
4041
size_t nnz = cJSON_GetNumberValue(nnz_);
4142

include/binsparse/write_matrix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ char* bsp_generate_json(bsp_matrix_t matrix, cJSON* user_json) {
3333
cJSON_AddItemToArray(shape, nrows);
3434
cJSON_AddItemToArray(shape, ncols);
3535

36-
cJSON_AddNumberToObject(binsparse, "nnz", matrix.nnz);
36+
cJSON_AddNumberToObject(binsparse, "number_of_stored_values", matrix.nnz);
3737

3838
cJSON* data_types = cJSON_AddObjectToObject(binsparse, "data_types");
3939

0 commit comments

Comments
 (0)