def gpuarray_shared_constructor(value, name=None, strict=False, allow_downcast=None, borrow=False, broadcastable=None, target=notset):
 if ((target == 'gpu') or (target == 'cpu')):
  raise TypeError('not for me')
 if (not isinstance(value, (numpy.ndarray, pygpu.gpuarray.GpuArray))):
  raise TypeError('ndarray or GpuArray required')
 if (target is notset):
  target = None
  if (not move_to_gpu(value)):
   raise TypeError('We do not move that data by default to the GPU')
 try:
  get_context(target)
 except ContextNotDefined:
  if (target is None):
   raise TypeError('No default context and no context specified')
  raise
 if (broadcastable is None):
  broadcastable = ((False,) * value.ndim)
 type = GpuArrayType(value.dtype, broadcastable, context_name=target)
 deviceval = pygpu.gpuarray.array(value, copy=(not borrow), context=type.context)
 return GpuArraySharedVariable(type=type, value=deviceval, name=name, strict=strict)

def gpuarray_shared_constructor ( value , name = None , strict = False , allow_downcast = None , borrow = False , broadcastable = None , target = notset ) : if ( ( target == 'gpu' ) or ( target == 'cpu' ) ) : raise TypeError ( 'not for me' ) if ( not isinstance ( value , ( numpy . ndarray , pygpu . gpuarray . GpuArray ) ) ) : raise TypeError ( 'ndarray or GpuArray required' ) if ( target is notset ) : target = None if ( not move_to_gpu ( value ) ) : raise TypeError ( 'We do not move that data by default to the GPU' ) try : get_context ( target ) except ContextNotDefined : if ( target is None ) : raise TypeError ( 'No default context and no context specified' ) raise if ( broadcastable is None ) : broadcastable = ( ( False , ) * value . ndim ) type = GpuArrayType ( value . dtype , broadcastable , context_name = target ) deviceval = pygpu . gpuarray . array ( value , copy = ( not borrow ) , context = type . context ) return GpuArraySharedVariable ( type = type , value = deviceval , name = name , strict = strict )
sharedvariable constructor for gpuarraytype .