File tree Expand file tree Collapse file tree 4 files changed +998
-146
lines changed
Expand file tree Collapse file tree 4 files changed +998
-146
lines changed Original file line number Diff line number Diff line change @@ -464,6 +464,25 @@ impl IMAnnData {
464464 layers,
465465 } )
466466 }
467+
468+ #[ cfg( test) ]
469+ pub fn debug_info ( & self ) -> anyhow:: Result < ( ) > {
470+ println ! ( "AnnData Debug Info:" ) ;
471+ println ! ( " Dimensions: {} obs x {} vars" , self . n_obs( ) , self . n_vars( ) ) ;
472+
473+ let x_shape = self . x ( ) . get_shape ( ) ?;
474+ println ! ( " X matrix shape: {:?}" , x_shape) ;
475+
476+ let obs_df_shape = self . obs ( ) . get_data ( ) . shape ( ) ;
477+ let var_df_shape = self . var ( ) . get_data ( ) . shape ( ) ;
478+ println ! ( " obs DataFrame shape: {:?}" , obs_df_shape) ;
479+ println ! ( " var DataFrame shape: {:?}" , var_df_shape) ;
480+
481+ println ! ( " First 3 obs names: {:?}" , & self . obs_names( ) [ ..self . n_obs( ) . min( 3 ) ] ) ;
482+ println ! ( " First 3 var names: {:?}" , & self . var_names( ) [ ..self . n_vars( ) . min( 3 ) ] ) ;
483+
484+ Ok ( ( ) )
485+ }
467486}
468487
469488use std:: fmt;
Original file line number Diff line number Diff line change @@ -51,6 +51,11 @@ pub(crate) fn select_info_elem_to_indices(
5151 }
5252}
5353
54+ // ####################################################################################################
55+ // Subsetting
56+ // ####################################################################################################
57+
58+
5459pub ( crate ) fn subset_dyn_csc_matrix (
5560 dyn_csc : DynCscMatrix ,
5661 s : & [ & SelectInfoElem ] ,
@@ -311,7 +316,6 @@ pub fn read_array_as_usize_optimized<B: Backend>(
311316}
312317
313318pub fn read_array_as_usize < B : Backend > ( dataset : & B :: Dataset ) -> anyhow:: Result < Vec < usize > > {
314- println ! ( "Dtype: {}" , dataset. dtype( ) ?) ;
315319 match dataset. dtype ( ) ? {
316320 ScalarType :: U64 => {
317321 let arr = dataset. read_array :: < u64 , ndarray:: Ix1 > ( ) ?;
You can’t perform that action at this time.
0 commit comments