def make_constant(args):
 def conv(a):
  if (a is None):
   return a
  elif isinstance(a, slice):
   return slice(conv(a.start), conv(a.stop), conv(a.step))
  elif isinstance(a, (integer_types, numpy.integer)):
   return scal.ScalarConstant(scal.int64, a)
  else:
   return a
 return tuple(map(conv, args))

def make_constant ( args ) : def conv ( a ) : if ( a is None ) : return a elif isinstance ( a , slice ) : return slice ( conv ( a . start ) , conv ( a . stop ) , conv ( a . step ) ) elif isinstance ( a , ( integer_types , numpy . integer ) ) : return scal . ScalarConstant ( scal . int64 , a ) else : return a return tuple ( map ( conv , args ) )
convert python litterals to theano constants in subtensor arguments .