{
    "nbformat": 4,
    "nbformat_minor": 5,
    "metadata": {
        "kernelspec": {
            "display_name": "Python",
            "language": "python",
            "name": "python"
        },
        "language_info": {
            "name": "python"
        }
    },
    "cells": [
        {
            "id": "96e6546b",
            "cell_type": "markdown",
            "source": "<div class='alert alert-warning'>\n\nSciPy's interactive examples with Jupyterlite are experimental and may not always work as expected. Execution of cells containing imports may result in large downloads (up to 60MB of content for the first import from SciPy). Load times when importing from SciPy may take roughly 10-20 seconds. If you notice any problems, feel free to open an [issue](https://github.com/scipy/scipy/issues/new/choose).\n\n</div>",
            "metadata": {}
        },
        {
            "id": "8365c24c",
            "cell_type": "markdown",
            "source": "In the following example `k1` returns 0 whereas `k1e` still returns a\nuseful floating point number.\n",
            "metadata": {}
        },
        {
            "id": "506c8ef5",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "from scipy.special import k1, k1e\nk1(1000.), k1e(1000.)",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "(0., 0.03964813081296021)"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "e2bed23d",
            "cell_type": "markdown",
            "source": "Calculate the function at several points by providing a NumPy array or\nlist for `x`:\n",
            "metadata": {}
        },
        {
            "id": "9491bc8a",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "import numpy as np\nk1e(np.array([0.5, 2., 3.]))",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([2.73100971, 1.03347685, 0.80656348])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "c7614554",
            "cell_type": "markdown",
            "source": "Plot the function from 0 to 10.\n",
            "metadata": {}
        },
        {
            "id": "dcad624e",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "import matplotlib.pyplot as plt\nfig, ax = plt.subplots()\nx = np.linspace(0., 10., 1000)\ny = k1e(x)\nax.plot(x, y)\nplt.show()",
            "outputs": []
        }
    ]
}