def _is_zero(x):
 if (not hasattr(x, 'type')):
  return np.all((x == 0.0))
 if isinstance(x.type, NullType):
  return 'no'
 if isinstance(x.type, DisconnectedType):
  return 'yes'
 no_constant_value = True
 try:
  constant_value = theano.get_scalar_constant_value(x)
  no_constant_value = False
 except theano.tensor.basic.NotScalarConstantError:
  pass
 if no_constant_value:
  return 'maybe'
 if (constant_value != 0.0):
  return 'no'
 return 'yes'

def _is_zero ( x ) : if ( not hasattr ( x , 'type' ) ) : return np . all ( ( x == 0.0 ) ) if isinstance ( x . type , NullType ) : return 'no' if isinstance ( x . type , DisconnectedType ) : return 'yes' no_constant_value = True try : constant_value = theano . get_scalar_constant_value ( x ) no_constant_value = False except theano . tensor . basic . NotScalarConstantError : pass if no_constant_value : return 'maybe' if ( constant_value != 0.0 ) : return 'no' return 'yes'
returns yes .