File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -532,10 +532,12 @@ def test_outputs(self):
532532 self .same_input_output_domain )
533533 np .testing .assert_array_equal (selected .X [:, :n_attr ],
534534 self .data .X [selected_indices ])
535+ self .assertEqual (selected .attributes , self .data .attributes )
535536
536537 # check annotated data output
537538 annotated = self .get_output (ANNOTATED_DATA_SIGNAL_NAME )
538539 self .assertEqual (n_sel , np .sum ([i [feature_name ] for i in annotated ]))
540+ self .assertEqual (annotated .attributes , self .data .attributes )
539541
540542 # compare selected and annotated data domains
541543 self ._compare_selected_annotated_domains (selected , annotated )
Original file line number Diff line number Diff line change @@ -41,5 +41,7 @@ def create_annotated_table(data, selected_indices):
4141 annotated = np .zeros ((len (data ), 1 ))
4242 if selected_indices is not None :
4343 annotated [selected_indices ] = 1
44- return Table (domain , data .X , data .Y ,
45- metas = np .hstack ((data .metas , annotated )))
44+ table = Table (domain , data .X , data .Y ,
45+ metas = np .hstack ((data .metas , annotated )))
46+ table .attributes = data .attributes
47+ return table
You can’t perform that action at this time.
0 commit comments