def from_array_like(ary, stream=0, gpu_data=None):
 if (ary.ndim == 0):
  ary = ary.reshape(1)
 return DeviceNDArray(ary.shape, ary.strides, ary.dtype, writeback=ary, stream=stream, gpu_data=gpu_data)

def from_array_like ( ary , stream = 0 , gpu_data = None ) : if ( ary . ndim == 0 ) : ary = ary . reshape ( 1 ) return DeviceNDArray ( ary . shape , ary . strides , ary . dtype , writeback = ary , stream = stream , gpu_data = gpu_data )
create a devicendarray object that is like ary .