def align_targets(predictions, targets):
 if ((getattr(predictions, 'broadcastable', None) == (False, True)) and (getattr(targets, 'ndim', None) == 1)):
  targets = as_theano_expression(targets).dimshuffle(0, 'x')
 return (predictions, targets)

def align_targets ( predictions , targets ) : if ( ( getattr ( predictions , 'broadcastable' , None ) == ( False , True ) ) and ( getattr ( targets , 'ndim' , None ) == 1 ) ) : targets = as_theano_expression ( targets ) . dimshuffle ( 0 , 'x' ) return ( predictions , targets )
helper function turning a target 1d vector into a column if needed .