{
    "nbformat": 4,
    "nbformat_minor": 5,
    "metadata": {
        "kernelspec": {
            "display_name": "Python",
            "language": "python",
            "name": "python"
        },
        "language_info": {
            "name": "python"
        }
    },
    "cells": [
        {
            "id": "8dd29b9f",
            "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": "0005389e",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "import numpy as np\nimport scipy.special as sc",
            "outputs": []
        },
        {
            "id": "e62f5c43",
            "cell_type": "markdown",
            "source": "It is one when `x` is zero:\n",
            "metadata": {}
        },
        {
            "id": "8c8d9d14",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "sc.hyp1f1(0.5, 0.5, 0)",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "1.0"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "dfeecd08",
            "cell_type": "markdown",
            "source": "It is singular when `b` is a nonpositive integer.\n",
            "metadata": {}
        },
        {
            "id": "2cba0695",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "sc.hyp1f1(0.5, -1, 0)",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "inf"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "08a63e4a",
            "cell_type": "markdown",
            "source": "It is a polynomial when `a` is a nonpositive integer.\n",
            "metadata": {}
        },
        {
            "id": "28218bd1",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "a, b, x = -1, 0.5, np.array([1.0, 2.0, 3.0, 4.0])\nsc.hyp1f1(a, b, x)",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([-1., -3., -5., -7.])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "f0dd839c",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "1 + (a / b) * x",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([-1., -3., -5., -7.])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "d2db929d",
            "cell_type": "markdown",
            "source": "It reduces to the exponential function when ``a = b``.\n",
            "metadata": {}
        },
        {
            "id": "67bc9dae",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "sc.hyp1f1(2, 2, [1, 2, 3, 4])",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([ 2.71828183,  7.3890561 , 20.08553692, 54.59815003])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "a3c7994c",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "np.exp([1, 2, 3, 4])",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([ 2.71828183,  7.3890561 , 20.08553692, 54.59815003])"
                    },
                    "execution_count": null
                }
            ]
        }
    ]
}