@@ -7,6 +7,7 @@ use anyhow::{Context, Result, bail};
77use nalgebra_sparse:: na:: Scalar ;
88use nalgebra_sparse:: { CscMatrix , CsrMatrix } ;
99use ndarray:: { Array , Array1 , ArrayD , ArrayView1 , RemoveAxis } ;
10+ use crate :: backend:: get_default_write_config;
1011
1112pub enum MatrixBuilder < B : Backend > {
1213 CsrMatrix ( CsrMatrixBuilder < B > ) ,
@@ -125,7 +126,7 @@ impl<B: Backend> CsrMatrixBuilder<B> {
125126 self . data . finish ( ) ?;
126127 self . indptr . push ( self . nnz ) ;
127128 self . group
128- . new_array_dataset ( "indptr" , self . indptr . into ( ) , Default :: default ( ) ) ?;
129+ . new_array_dataset ( "indptr" , self . indptr . into ( ) , get_default_write_config ( ) ) ?;
129130 self . group . new_attr (
130131 "shape" ,
131132 [ self . num_rows as u64 , self . num_cols . unwrap_or ( 0 ) as u64 ] . as_slice ( ) ,
@@ -470,7 +471,7 @@ impl<T: BackendData> ArrayChunk for CsrMatrix<T> {
470471 indices. finish ( ) ?;
471472 data. finish ( ) ?;
472473 indptr. push ( nnz) ;
473- group. new_array_dataset ( "indptr" , indptr. into ( ) , Default :: default ( ) ) ?;
474+ group. new_array_dataset ( "indptr" , indptr. into ( ) , get_default_write_config ( ) ) ?;
474475 group. new_attr (
475476 "shape" ,
476477 [ num_rows as u64 , num_cols. unwrap_or ( 0 ) as u64 ] . as_slice ( ) ,
@@ -600,7 +601,7 @@ impl<T: BackendData> ArrayChunk for CsrNonCanonical<T> {
600601 indices. finish ( ) ?;
601602 data. finish ( ) ?;
602603 indptr. push ( nnz) ;
603- group. new_array_dataset ( "indptr" , indptr. into ( ) , Default :: default ( ) ) ?;
604+ group. new_array_dataset ( "indptr" , indptr. into ( ) , get_default_write_config ( ) ) ?;
604605 group. new_attr (
605606 "shape" ,
606607 [ num_rows as u64 , num_cols. unwrap_or ( 0 ) as u64 ] . as_slice ( ) ,
@@ -734,7 +735,7 @@ impl<T: BackendData + Scalar> ArrayChunk for CscMatrix<T> {
734735 indices.finish()?;
735736 data.finish()?;
736737 indptr.push(nnz);
737- group.create_array_data("indptr", &indptr, Default::default ())?;
738+ group.create_array_data("indptr", &indptr, get_default_write_config ())?;
738739 group.write_array_attr("shape", &[num_rows.unwrap_or(0), num_cols])?;
739740 Ok(DataContainer::Group(group))
740741 */
0 commit comments