def _datacopied(arr, original):
 if (arr is original):
  return False
 if ((not isinstance(original, numpy.ndarray)) and hasattr(original, '__array__')):
  return False
 return (arr.base is None)

def _datacopied ( arr , original ) : if ( arr is original ) : return False if ( ( not isinstance ( original , numpy . ndarray ) ) and hasattr ( original , '__array__' ) ) : return False return ( arr . base is None )
strict check for arr not sharing any data with original .