{
    "nbformat": 4,
    "nbformat_minor": 5,
    "metadata": {
        "kernelspec": {
            "display_name": "Python",
            "language": "python",
            "name": "python"
        },
        "language_info": {
            "name": "python"
        }
    },
    "cells": [
        {
            "id": "0fc34952",
            "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": "201defc0",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "import numpy as np\nimport scipy.special as sc",
            "outputs": []
        },
        {
            "id": "47eaa170",
            "cell_type": "markdown",
            "source": "It has a pole at 0.\n",
            "metadata": {}
        },
        {
            "id": "44be692f",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "sc.exp1(0)",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "inf"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "60ce4669",
            "cell_type": "markdown",
            "source": "It has a branch cut on the negative real axis.\n",
            "metadata": {}
        },
        {
            "id": "3169bef5",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "sc.exp1(-1)",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "nan"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "970ce50d",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "sc.exp1(complex(-1, 0))",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "(-1.8951178163559368-3.141592653589793j)"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "93db9a63",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "sc.exp1(complex(-1, -0.0))",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "(-1.8951178163559368+3.141592653589793j)"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "aed312e6",
            "cell_type": "markdown",
            "source": "It approaches 0 along the positive real axis.\n",
            "metadata": {}
        },
        {
            "id": "be5b34c2",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "sc.exp1([1, 10, 100, 1000])",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([2.19383934e-01, 4.15696893e-06, 3.68359776e-46, 0.00000000e+00])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "41bf655e",
            "cell_type": "markdown",
            "source": "It is related to `expi`.\n",
            "metadata": {}
        },
        {
            "id": "48f2178d",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "x = np.array([1, 2, 3, 4])\nsc.exp1(x)",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([0.21938393, 0.04890051, 0.01304838, 0.00377935])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "127b3d5a",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "-sc.expi(-x)",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([0.21938393, 0.04890051, 0.01304838, 0.00377935])"
                    },
                    "execution_count": null
                }
            ]
        }
    ]
}