code: def from_rows( Class, alphabet, rows ):
          
          # Sorted alphabet
          sorted_alphabet = sorted( alphabet )
          # Character to index mapping (initialized to -1)
          char_to_index = zeros( (256), int16 ) - 1
          for i, ch  in enumerate( sorted_alphabet ):
              char_to_index[ ord(ch) ] = i
          # Array
          values = zeros( ( len( rows) , len( alphabet ) ), float32 )
          for i, row in enumerate( rows ):
              assert len( row ) == len( alphabet )
              for ch, val in zip( alphabet, row ):
                  values[i, char_to_index[ord(ch)]] = val
          # Matrix
          matrix = Class()
          matrix.alphabet = alphabet
          matrix.sorted_alphabet = sorted_alphabet
          matrix.char_to_index = char_to_index
          matrix.values = values
          return matrix
docs: Create a new matrix for a sequence over alphabet `alphabet` taking 
          values from `rows` which is a list whose length is the width of the
          matrix, and whose elements are lists of values associated with each
          character (in the order those characters appear in alphabet).