{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The irrational number "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "e"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is also known as Euler's number.  It is approximately 2.718281, and is the base of the natural logarithm, "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "ln"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " (this means that, if "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "x = \\ln y = \\log_e y"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", then "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "e^x = y"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". For real input, "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "exp(x)"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is always positive."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "For complex arguments, "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "x = a + ib"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", we can write "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "e^x = e^a e^{ib}"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ".  The first term, "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "e^a"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", is already known (it is the real argument, described above).  The second term, "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "e^{ib}"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", is "
            },
            {
              "__type": "InlineMath",
              "__tag": 4057,
              "value": "\\cos b + i \\sin b"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", a function with magnitude 1 and a periodic phase."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "out",
              "annotation": "ndarray or scalar",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Output array, element-wise exponential of "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "x",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": null,
                        "version": null,
                        "kind": "local",
                        "path": "x"
                      },
                      "kind": "local"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". This is a scalar if "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "x",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": null,
                        "version": null,
                        "kind": "local",
                        "path": "x"
                      },
                      "kind": "local"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is a scalar."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Calculate the exponential of all elements in the input array."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "x",
              "annotation": "array_like",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Input values."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "out",
              "annotation": "ndarray, None, or tuple of ndarray and None, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "A location into which the result is stored. If provided, it must have a shape that the inputs broadcast to. If not provided or None, a freshly-allocated array is returned. A tuple (possible only as a keyword argument) must have length equal to the number of outputs."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "where",
              "annotation": "array_like, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "This condition is broadcast over the input. At locations where the condition is True, the "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "out",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": null,
                        "version": null,
                        "kind": "local",
                        "path": "out"
                      },
                      "kind": "local"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " array will be set to the ufunc result. Elsewhere, the "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "out",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": null,
                        "version": null,
                        "kind": "local",
                        "path": "out"
                      },
                      "kind": "local"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " array will retain its original value. Note that if an uninitialized "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "out",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": null,
                        "version": null,
                        "kind": "local",
                        "path": "out"
                      },
                      "kind": "local"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " array is created via the default "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "out=None"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", locations within it where the condition is False will remain uninitialized."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "**kwargs",
              "annotation": "",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "For other keyword-only arguments, see the "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "ufunc docs <ufuncs.kwargs>",
                      "domain": null,
                      "role": "ref",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Attributes",
    "Methods",
    "Returns",
    "Yields",
    "Receives",
    "Other Parameters",
    "Raises",
    "Warns",
    "Warnings",
    "Notes"
  ],
  "item_file": "/dev/numpy/build-install/usr/lib/python3.14/site-packages/numpy/__init__.py",
  "item_line": null,
  "item_type": "ufunc",
  "aliases": [
    "numpy.exp"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "Plot the magnitude and phase of ``exp(x)`` in the complex plane:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "import numpy as np\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "import matplotlib.pyplot as plt\nimport numpy as np\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "x = np.linspace(-2*np.pi, 2*np.pi, 100)\nxx = x + 1j * x[:, np.newaxis] # a + ib over complex plane\nout = np.exp(xx)\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "plt.subplot(121)\nplt.imshow(np.abs(out),\n           extent=[-2*np.pi, 2*np.pi, -2*np.pi, 2*np.pi], cmap='gray')\nplt.title('Magnitude of exp(x)')\n",
        "execution_status": "failure"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "plt.subplot(122)\nplt.imshow(np.angle(out),\n           extent=[-2*np.pi, 2*np.pi, -2*np.pi, 2*np.pi], cmap='hsv')\nplt.title('Phase (angle) of exp(x)')\n",
        "execution_status": "failure"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "plt.show()\n",
        "execution_status": "success"
      },
      {
        "__type": "Figure",
        "__tag": 4024,
        "value": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "numpy",
          "version": "2.5.0.dev0+git20251130.2de293a",
          "kind": "assets",
          "path": "fig-653fec1b1e20862e.png"
        }
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "exp2",
        "reference": {
          "__type": "LocalRef",
          "__tag": 4022,
          "kind": "module",
          "path": "numpy:exp2"
        },
        "kind": "module"
      },
      "descriptions": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Calculate "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "2**x"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for all elements in the array."
            }
          ]
        }
      ],
      "type": null
    },
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "expm1",
        "reference": {
          "__type": "LocalRef",
          "__tag": 4022,
          "kind": "module",
          "path": "numpy:expm1"
        },
        "kind": "module"
      },
      "descriptions": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Calculate "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "exp(x) - 1"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for all elements in the array."
            }
          ]
        }
      ],
      "type": null
    }
  ],
  "signature": null,
  "references": [
    ".. [1] Wikipedia, \"Exponential function\",",
    "       https://en.wikipedia.org/wiki/Exponential_function",
    ".. [2] M. Abramovitz and I. A. Stegun, \"Handbook of Mathematical Functions",
    "       with Formulas, Graphs, and Mathematical Tables,\" Dover, 1964, p. 69,",
    "       https://personal.math.ubc.ca/~cbm/aands/page_69.htm"
  ],
  "qa": "numpy:exp",
  "arbitrary": [],
  "local_refs": [
    "**kwargs",
    "out",
    "where",
    "x"
  ]
}