{
    "nbformat": 4,
    "nbformat_minor": 5,
    "metadata": {
        "kernelspec": {
            "display_name": "Python",
            "language": "python",
            "name": "python"
        },
        "language_info": {
            "name": "python"
        }
    },
    "cells": [
        {
            "id": "b5b41d1b",
            "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": "9361eae8",
            "cell_type": "markdown",
            "source": "The Type 1 DCT is equivalent to the FFT (though faster) for real,\neven-symmetrical inputs. The output is also real and even-symmetrical.\nHalf of the FFT input is used to generate half of the FFT output:\n",
            "metadata": {}
        },
        {
            "id": "8d12793e",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "from scipy.fftpack import fft, dct\nimport numpy as np\nfft(np.array([4., 3., 5., 10., 5., 3.])).real",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([ 30.,  -8.,   6.,  -2.,   6.,  -8.])"
                    },
                    "execution_count": null
                }
            ]
        },
        {
            "id": "a4705018",
            "cell_type": "code",
            "metadata": {},
            "execution_count": null,
            "source": "dct(np.array([4., 3., 5., 10.]), 1)",
            "outputs": [
                {
                    "output_type": "execute_result",
                    "metadata": {},
                    "data": {
                        "text/plain": "array([ 30.,  -8.,   6.,  -2.])"
                    },
                    "execution_count": null
                }
            ]
        }
    ]
}