def one_hot(x, m=None):
 if (m is None):
  m = T.cast((T.max(x) + 1), 'int32')
 return T.eye(m)[T.cast(x, 'int32')]

def one_hot ( x , m = None ) : if ( m is None ) : m = T . cast ( ( T . max ( x ) + 1 ) , 'int32' ) return T . eye ( m ) [ T . cast ( x , 'int32' ) ]
return a one-hot transform of values parameters values : 1d array integer values .