def METHOD_NAME(arr, res, precision=None):
    # ensure numpy array with matching dtype
    res = ensure_ndarray(res).view(arr.dtype)
    # convert to correct shape
    if arr.flags.f_contiguous:
        order = "F"
    else:
        order = "C"
    res = res.reshape(arr.shape, order=order)
    # exact compare
    if precision is None:
        assert_array_equal(arr, res)
    # fuzzy compare
    else:
        assert_array_almost_equal(arr, res, decimal=precision)