@@ -11074,6 +11074,104 @@ TreeSequence_get_individuals_metadata_offset(TreeSequence *self, void *closure)
1107411074 return ret ;
1107511075}
1107611076
11077+ static PyObject *
11078+ TreeSequence_get_individuals_location (TreeSequence * self , void * closure )
11079+ {
11080+ PyObject * ret = NULL ;
11081+ tsk_individual_table_t individuals ;
11082+
11083+ if (TreeSequence_check_state (self ) != 0 ) {
11084+ goto out ;
11085+ }
11086+ individuals = self -> tree_sequence -> tables -> individuals ;
11087+ ret = TreeSequence_make_array (
11088+ self , individuals .location_length , NPY_FLOAT64 , individuals .location );
11089+ out :
11090+ return ret ;
11091+ }
11092+
11093+ static PyObject *
11094+ TreeSequence_get_individuals_location_offset (TreeSequence * self , void * closure )
11095+ {
11096+ PyObject * ret = NULL ;
11097+ tsk_individual_table_t individuals ;
11098+
11099+ if (TreeSequence_check_state (self ) != 0 ) {
11100+ goto out ;
11101+ }
11102+ individuals = self -> tree_sequence -> tables -> individuals ;
11103+ ret = TreeSequence_make_array (
11104+ self , individuals .num_rows + 1 , NPY_UINT64 , individuals .location_offset );
11105+ out :
11106+ return ret ;
11107+ }
11108+
11109+ static PyObject *
11110+ TreeSequence_get_individuals_parents (TreeSequence * self , void * closure )
11111+ {
11112+ PyObject * ret = NULL ;
11113+ tsk_individual_table_t individuals ;
11114+
11115+ if (TreeSequence_check_state (self ) != 0 ) {
11116+ goto out ;
11117+ }
11118+ individuals = self -> tree_sequence -> tables -> individuals ;
11119+ ret = TreeSequence_make_array (
11120+ self , individuals .parents_length , NPY_INT32 , individuals .parents );
11121+ out :
11122+ return ret ;
11123+ }
11124+
11125+ static PyObject *
11126+ TreeSequence_get_individuals_parents_offset (TreeSequence * self , void * closure )
11127+ {
11128+ PyObject * ret = NULL ;
11129+ tsk_individual_table_t individuals ;
11130+
11131+ if (TreeSequence_check_state (self ) != 0 ) {
11132+ goto out ;
11133+ }
11134+ individuals = self -> tree_sequence -> tables -> individuals ;
11135+ ret = TreeSequence_make_array (
11136+ self , individuals .num_rows + 1 , NPY_UINT64 , individuals .parents_offset );
11137+ out :
11138+ return ret ;
11139+ }
11140+
11141+ #if HAVE_NUMPY_2
11142+ static PyObject *
11143+ TreeSequence_get_provenances_timestamp (TreeSequence * self , void * closure )
11144+ {
11145+ PyObject * ret = NULL ;
11146+ tsk_provenance_table_t provenances ;
11147+
11148+ if (TreeSequence_check_state (self ) != 0 ) {
11149+ goto out ;
11150+ }
11151+ provenances = self -> tree_sequence -> tables -> provenances ;
11152+ ret = TreeSequence_decode_ragged_string_column (
11153+ self , provenances .num_rows , provenances .timestamp , provenances .timestamp_offset );
11154+ out :
11155+ return ret ;
11156+ }
11157+
11158+ static PyObject *
11159+ TreeSequence_get_provenances_record (TreeSequence * self , void * closure )
11160+ {
11161+ PyObject * ret = NULL ;
11162+ tsk_provenance_table_t provenances ;
11163+
11164+ if (TreeSequence_check_state (self ) != 0 ) {
11165+ goto out ;
11166+ }
11167+ provenances = self -> tree_sequence -> tables -> provenances ;
11168+ ret = TreeSequence_decode_ragged_string_column (
11169+ self , provenances .num_rows , provenances .record , provenances .record_offset );
11170+ out :
11171+ return ret ;
11172+ }
11173+ #endif
11174+
1107711175static PyObject *
1107811176TreeSequence_get_nodes_time (TreeSequence * self , void * closure )
1107911177{
@@ -12005,6 +12103,18 @@ static PyGetSetDef TreeSequence_getsetters[] = {
1200512103 { .name = "individuals_metadata_offset" ,
1200612104 .get = (getter ) TreeSequence_get_individuals_metadata_offset ,
1200712105 .doc = "The individual metadata offset array" },
12106+ { .name = "individuals_location" ,
12107+ .get = (getter ) TreeSequence_get_individuals_location ,
12108+ .doc = "The individual location array" },
12109+ { .name = "individuals_location_offset" ,
12110+ .get = (getter ) TreeSequence_get_individuals_location_offset ,
12111+ .doc = "The individual location offset array" },
12112+ { .name = "individuals_parents" ,
12113+ .get = (getter ) TreeSequence_get_individuals_parents ,
12114+ .doc = "The individual parents array" },
12115+ { .name = "individuals_parents_offset" ,
12116+ .get = (getter ) TreeSequence_get_individuals_parents_offset ,
12117+ .doc = "The individual parents offset array" },
1200812118 { .name = "nodes_time" ,
1200912119 .get = (getter ) TreeSequence_get_nodes_time ,
1201012120 .doc = "The node time array" },
@@ -12117,6 +12227,14 @@ static PyGetSetDef TreeSequence_getsetters[] = {
1211712227 { .name = "indexes_edge_removal_order" ,
1211812228 .get = (getter ) TreeSequence_get_indexes_edge_removal_order ,
1211912229 .doc = "The edge removal order array" },
12230+ #if HAVE_NUMPY_2
12231+ { .name = "provenances_timestamp" ,
12232+ .get = (getter ) TreeSequence_get_provenances_timestamp ,
12233+ .doc = "The provenance timestamp array" },
12234+ { .name = "provenances_record" ,
12235+ .get = (getter ) TreeSequence_get_provenances_record ,
12236+ .doc = "The provenance record array" },
12237+ #endif
1212012238 { NULL } /* Sentinel */
1212112239};
1212212240
0 commit comments