@shared_constructor
def tensor_constructor(value, name=None, strict=False, allow_downcast=None, borrow=False, broadcastable=None, target='cpu'):
 if (target != 'cpu'):
  raise TypeError('not for cpu')
 if (not isinstance(value, numpy.ndarray)):
  raise TypeError()
 if (broadcastable is None):
  broadcastable = ((False,) * len(value.shape))
 type = TensorType(value.dtype, broadcastable=broadcastable)
 return TensorSharedVariable(type=type, value=numpy.array(value, copy=(not borrow)), name=name, strict=strict, allow_downcast=allow_downcast)

@ shared_constructor def tensor_constructor ( value , name = None , strict = False , allow_downcast = None , borrow = False , broadcastable = None , target = 'cpu' ) : if ( target != 'cpu' ) : raise TypeError ( 'not for cpu' ) if ( not isinstance ( value , numpy . ndarray ) ) : raise TypeError ( ) if ( broadcastable is None ) : broadcastable = ( ( False , ) * len ( value . shape ) ) type = TensorType ( value . dtype , broadcastable = broadcastable ) return TensorSharedVariable ( type = type , value = numpy . array ( value , copy = ( not borrow ) ) , name = name , strict = strict , allow_downcast = allow_downcast )
sharedvariable constructor for tensortype .