def _copy_array_if_base_present(a):
if a.base is not None:<EOL><INDENT>return a.copy()<EOL><DEDENT>elif np.issubsctype(a, np.float32):<EOL><INDENT>return np.array(a, dtype=np.double)<EOL><DEDENT>else:<EOL><INDENT>return a<EOL><DEDENT>
Copies the array if its base points to a parent array.