{
    "nbformat": 4,
    "nbformat_minor": 5,
    "metadata": {
        "kernelspec": {
            "display_name": "Python",
            "language": "python",
            "name": "python"
        },
        "language_info": {
            "name": "python"
        }
    },
    "cells": [
        {
            "id": "1358af90",
            "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": "77c120c2",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "import numpy as np\nfrom scipy import linalg\na = np.array([[0., -1.], [1., 0.]])\nlinalg.eigvals(a)",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([0.+1.j, 0.-1.j])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "def72e3c",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "b = np.array([[0., 1.], [1., 1.]])\nlinalg.eigvals(a, b)",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([ 1.+0.j, -1.+0.j])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "b1dd8b4f",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "a = np.array([[3., 0., 0.], [0., 8., 0.], [0., 0., 7.]])\nlinalg.eigvals(a, homogeneous_eigvals=True)",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([[3.+0.j, 8.+0.j, 7.+0.j],\n       [1.+0.j, 1.+0.j, 1.+0.j]])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "d314e8fd",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "a = np.array([[0., -1.], [1., 0.]])\nlinalg.eigvals(a) == linalg.eig(a)[0]",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([ True,  True])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "78060dc7",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "linalg.eig(a, left=True, right=False)[1] # normalized left eigenvector",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([[-0.70710678+0.j        , -0.70710678-0.j        ],\n       [-0.        +0.70710678j, -0.        -0.70710678j]])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "d5fdff47",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "linalg.eig(a, left=False, right=True)[1] # normalized right eigenvector",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([[0.70710678+0.j        , 0.70710678-0.j        ],\n       [0.        -0.70710678j, 0.        +0.70710678j]])"
                    },
                    "execution_count": null
                }
            ]
        }
    ]
}