#NEWLINE# def test_np_format_as_indexsequence2vectorsequence( ) : #NEWLINE# #INDENT# index_sequence_space = IndexSequenceSpace ( max_labels = 6 , dim = 1 ) #NEWLINE# vector_sequence_space = VectorSequenceSpace ( dim = 6 ) #NEWLINE# data = np . array ( [ [ 0 ] , [ 1 ] , [ 4 ] , [ 3 ] ] , dtype = index_sequence_space . dtype ) #NEWLINE# rval = index_sequence_space . np_format_as ( data , vector_sequence_space ) #NEWLINE# true_val = np . array ( [ [ 1 , 0 , 0 , 0 , 0 , 0 ] , [ 0 , 1 , 0 , 0 , 0 , 0 ] , [ 0 , 0 , 0 , 0 , 1 , 0 ] , [ 0 , 0 , 0 , 1 , 0 , 0 ] ] ) #NEWLINE# assert np . all ( ( rval == true_val ) )