def _lessbroken_deepcopy(a):
 from theano.gof.type import _cdata_type
 if (type(a) in (numpy.ndarray, numpy.memmap)):
  rval = a.copy()
 elif (type(a) is _cdata_type):
  rval = a
 else:
  rval = copy.deepcopy(a)
 assert (type(rval) == type(a)), (type(rval), type(a))
 if isinstance(rval, numpy.ndarray):
  assert (rval.dtype == a.dtype)
 return rval

def _lessbroken_deepcopy ( a ) : from theano . gof . type import _cdata_type if ( type ( a ) in ( numpy . ndarray , numpy . memmap ) ) : rval = a . copy ( ) elif ( type ( a ) is _cdata_type ) : rval = a else : rval = copy . deepcopy ( a ) assert ( type ( rval ) == type ( a ) ) , ( type ( rval ) , type ( a ) ) if isinstance ( rval , numpy . ndarray ) : assert ( rval . dtype == a . dtype ) return rval
parameters a any object returns object a copy of a that shares no internal storage with the original .