def _asarray(a, dtype, order=None):
 if (str(dtype) == 'floatX'):
  dtype = theano.config.floatX
 dtype = numpy.dtype(dtype)
 rval = numpy.asarray(a, dtype=dtype, order=order)
 if (rval.dtype.num != dtype.num):
  if (dtype.str == rval.dtype.str):
   return rval.view(dtype=dtype)
  else:
   raise TypeError(('numpy.array did not return the data type we asked for (%s %s #%s), instead it returned type %s %s #%s: function theano._asarray may need to be modified to handle this data type.' % (dtype, dtype.str, dtype.num, rval.dtype, rval.str, rval.dtype.num)))
 else:
  return rval

def _asarray ( a , dtype , order = None ) : if ( str ( dtype ) == 'floatX' ) : dtype = theano . config . floatX dtype = numpy . dtype ( dtype ) rval = numpy . asarray ( a , dtype = dtype , order = order ) if ( rval . dtype . num != dtype . num ) : if ( dtype . str == rval . dtype . str ) : return rval . view ( dtype = dtype ) else : raise TypeError ( ( 'numpy.array did not return the data type we asked for (%s %s #%s), instead it returned type %s %s #%s: function theano._asarray may need to be modified to handle this data type.' % ( dtype , dtype . str , dtype . num , rval . dtype , rval . str , rval . dtype . num ) ) ) else : return rval
convert the input to a numpy array .