

def _castCopy(type, *arrays):
    cast_arrays = ()
    for a in arrays:
        if (a.dtype.char == type):
            cast_arrays = (cast_arrays + (a.copy(),))
        else:
            cast_arrays = (cast_arrays + (a.astype(type),))
    if (len(cast_arrays) == 1):
        return cast_arrays[0]
    else:
        return cast_arrays

dataset/ETHPy150Open scipy/scipy/scipy/linalg/decomp_schur.py _castCopy/original