@@ -25,7 +25,7 @@ void write_dense_vector(H5::Group& f, std::span<T> v,
2525 j[" binsparse" ][" version" ] = version;
2626 j[" binsparse" ][" format" ] = " DVEC" ;
2727 j[" binsparse" ][" shape" ] = {v.size ()};
28- j[" binsparse" ][" nnz " ] = v.size ();
28+ j[" binsparse" ][" number_of_stored_values " ] = v.size ();
2929 j[" binsparse" ][" data_types" ][" values" ] = type_info<T>::label ();
3030
3131 for (auto && v : user_keys.items ()) {
@@ -51,7 +51,7 @@ auto read_dense_vector(std::string fname, Allocator&& alloc = Allocator{}) {
5151 assert (format == " DVEC" );
5252
5353 auto nvalues = binsparse_metadata[" shape" ][0 ];
54- auto nnz = binsparse_metadata[" nnz " ];
54+ auto nnz = binsparse_metadata[" number_of_stored_values " ];
5555
5656 assert (nvalues == nnz);
5757
@@ -76,7 +76,7 @@ void write_dense_matrix(H5::Group& f, dense_matrix<T, I, Order> m,
7676 j[" binsparse" ][" version" ] = version;
7777 j[" binsparse" ][" format" ] = __detail::get_matrix_format_string (m);
7878 j[" binsparse" ][" shape" ] = {m.m , m.n };
79- j[" binsparse" ][" nnz " ] = m.m * m.n ;
79+ j[" binsparse" ][" number_of_stored_values " ] = m.m * m.n ;
8080 j[" binsparse" ][" data_types" ][" values" ] = type_info<T>::label ();
8181
8282 if (m.structure != general) {
@@ -118,7 +118,7 @@ auto read_dense_matrix(std::string fname, Allocator&& alloc = Allocator{}) {
118118
119119 auto nrows = binsparse_metadata[" shape" ][0 ];
120120 auto ncols = binsparse_metadata[" shape" ][1 ];
121- auto nnz = binsparse_metadata[" nnz " ];
121+ auto nnz = binsparse_metadata[" number_of_stored_values " ];
122122
123123 auto values = hdf5_tools::read_dataset<T>(f, " values" , alloc);
124124
@@ -149,7 +149,7 @@ void write_csr_matrix(H5::Group& f, csr_matrix<T, I> m,
149149 j[" binsparse" ][" version" ] = version;
150150 j[" binsparse" ][" format" ] = " CSR" ;
151151 j[" binsparse" ][" shape" ] = {m.m , m.n };
152- j[" binsparse" ][" nnz " ] = m.nnz ;
152+ j[" binsparse" ][" number_of_stored_values " ] = m.nnz ;
153153 j[" binsparse" ][" data_types" ][" pointers_to_1" ] = type_info<I>::label ();
154154 j[" binsparse" ][" data_types" ][" indices_1" ] = type_info<I>::label ();
155155 j[" binsparse" ][" data_types" ][" values" ] = type_info<T>::label ();
@@ -189,7 +189,7 @@ csr_matrix<T, I> read_csr_matrix(std::string fname, Allocator&& alloc) {
189189
190190 auto nrows = binsparse_metadata[" shape" ][0 ];
191191 auto ncols = binsparse_metadata[" shape" ][1 ];
192- auto nnz = binsparse_metadata[" nnz " ];
192+ auto nnz = binsparse_metadata[" number_of_stored_values " ];
193193
194194 typename std::allocator_traits<
195195 std::remove_cvref_t <Allocator>>::template rebind_alloc<I>
@@ -232,7 +232,7 @@ void write_csc_matrix(H5::Group& f, csc_matrix<T, I> m,
232232 j[" binsparse" ][" version" ] = version;
233233 j[" binsparse" ][" format" ] = " CSR" ;
234234 j[" binsparse" ][" shape" ] = {m.m , m.n };
235- j[" binsparse" ][" nnz " ] = m.nnz ;
235+ j[" binsparse" ][" number_of_stored_values " ] = m.nnz ;
236236 j[" binsparse" ][" data_types" ][" pointers_to_1" ] = type_info<I>::label ();
237237 j[" binsparse" ][" data_types" ][" indices_1" ] = type_info<I>::label ();
238238 j[" binsparse" ][" data_types" ][" values" ] = type_info<T>::label ();
@@ -272,7 +272,7 @@ csc_matrix<T, I> read_csc_matrix(std::string fname, Allocator&& alloc) {
272272
273273 auto nrows = binsparse_metadata[" shape" ][0 ];
274274 auto ncols = binsparse_metadata[" shape" ][1 ];
275- auto nnz = binsparse_metadata[" nnz " ];
275+ auto nnz = binsparse_metadata[" number_of_stored_values " ];
276276
277277 typename std::allocator_traits<
278278 std::remove_cvref_t <Allocator>>::template rebind_alloc<I>
@@ -315,7 +315,7 @@ void write_coo_matrix(H5::Group& f, coo_matrix<T, I> m,
315315 j[" binsparse" ][" version" ] = version;
316316 j[" binsparse" ][" format" ] = " COO" ;
317317 j[" binsparse" ][" shape" ] = {m.m , m.n };
318- j[" binsparse" ][" nnz " ] = m.nnz ;
318+ j[" binsparse" ][" number_of_stored_values " ] = m.nnz ;
319319 j[" binsparse" ][" data_types" ][" indices_0" ] = type_info<I>::label ();
320320 j[" binsparse" ][" data_types" ][" indices_1" ] = type_info<I>::label ();
321321 j[" binsparse" ][" data_types" ][" values" ] = type_info<T>::label ();
@@ -357,7 +357,7 @@ coo_matrix<T, I> read_coo_matrix(std::string fname, Allocator&& alloc) {
357357
358358 auto nrows = binsparse_metadata[" shape" ][0 ];
359359 auto ncols = binsparse_metadata[" shape" ][1 ];
360- auto nnz = binsparse_metadata[" nnz " ];
360+ auto nnz = binsparse_metadata[" number_of_stored_values " ];
361361
362362 typename std::allocator_traits<
363363 std::remove_cvref_t <Allocator>>::template rebind_alloc<I>
0 commit comments