def assert_numpy(x):
    if not isinstance(x, np.ndarray):
        x = x.as_numpy_array()
    else:
        x = x.copy()
    return x
Given a gnumpy or numpy array x, return an array with the same contents.
dataset/ETHPy150Open BRML/climin/climin/mathadapt.py/assert_numpy