def xy_example_values():
    """
    Output: "x" 1D values, "y" 2D values, and 1D "p" values for the example plot
    """

    def model(x, p):  # from examples/plot-examples.py
        return x ** (2 * p + 1) / (1 + x ** (2 * p))

    x = np.linspace(0.75, 1.25, 201)
    p = [10, 15, 20, 30, 50, 100]
    res = np.fromiter(map(lambda p: model(x, p), p), dtype=np.dtype((float, len(x))))
    return x, res, p
Output: "x" 1D values, "y" 2D values, and 1D "p" values for the example plot
scienceplots/tests/conftest.py