Procházet zdrojové kódy

CMSIS-DSP: Corrected issue in python example.

Christophe Favergeon před 4 roky
rodič
revize
b8a7fd8870

+ 48 - 49
CMSIS/DSP/PythonWrapper/examples/Noise suppression.ipynb

@@ -55,7 +55,6 @@
     "import numpy as np\n",
     "from numpy.lib.stride_tricks import sliding_window_view\n",
     "from scipy.signal.windows import hann\n",
-    "from scipy.signal import correlate,correlation_lags\n",
     "\n",
     "# Package for plotting\n",
     "import matplotlib.pyplot as plt\n",
@@ -107,7 +106,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 450,
+   "execution_count": 2,
    "id": "3c298f96",
    "metadata": {},
    "outputs": [],
@@ -196,7 +195,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 452,
+   "execution_count": 3,
    "id": "46f7169b",
    "metadata": {},
    "outputs": [
@@ -214,7 +213,7 @@
        "<IPython.lib.display.Audio object>"
       ]
      },
-     "execution_count": 452,
+     "execution_count": 3,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -234,7 +233,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 453,
+   "execution_count": 4,
    "id": "9b7c4b14",
    "metadata": {},
    "outputs": [],
@@ -258,7 +257,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 454,
+   "execution_count": 5,
    "id": "1f446dfc",
    "metadata": {},
    "outputs": [
@@ -293,7 +292,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 455,
+   "execution_count": 6,
    "id": "4427ae73",
    "metadata": {},
    "outputs": [],
@@ -339,7 +338,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 145,
+   "execution_count": 7,
    "id": "cfa5a997",
    "metadata": {},
    "outputs": [],
@@ -357,7 +356,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 322,
+   "execution_count": 8,
    "id": "23a57a6b",
    "metadata": {},
    "outputs": [],
@@ -385,7 +384,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 456,
+   "execution_count": 9,
    "id": "d8cf68d2",
    "metadata": {
     "scrolled": true
@@ -394,10 +393,10 @@
     {
      "data": {
       "text/plain": [
-       "[<matplotlib.lines.Line2D at 0x2d165c00be0>]"
+       "[<matplotlib.lines.Line2D at 0x1dbe9025c00>]"
       ]
      },
-     "execution_count": 456,
+     "execution_count": 9,
      "metadata": {},
      "output_type": "execute_result"
     },
@@ -442,7 +441,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 337,
+   "execution_count": 10,
    "id": "37e41c05",
    "metadata": {},
    "outputs": [],
@@ -481,17 +480,17 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 457,
+   "execution_count": 11,
    "id": "276749ae",
    "metadata": {},
    "outputs": [
     {
      "data": {
       "text/plain": [
-       "[<matplotlib.lines.Line2D at 0x2d1aa254040>]"
+       "[<matplotlib.lines.Line2D at 0x1dbeb48afb0>]"
       ]
      },
-     "execution_count": 457,
+     "execution_count": 11,
      "metadata": {},
      "output_type": "execute_result"
     },
@@ -528,7 +527,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 335,
+   "execution_count": 12,
    "id": "51e5db4f",
    "metadata": {},
    "outputs": [],
@@ -566,17 +565,17 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 458,
+   "execution_count": 13,
    "id": "3e9e5692",
    "metadata": {},
    "outputs": [
     {
      "data": {
       "text/plain": [
-       "[<matplotlib.lines.Line2D at 0x2d1a2b27100>]"
+       "[<matplotlib.lines.Line2D at 0x1dbeb50bee0>]"
       ]
      },
-     "execution_count": 458,
+     "execution_count": 13,
      "metadata": {},
      "output_type": "execute_result"
     },
@@ -620,7 +619,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 459,
+   "execution_count": 14,
    "id": "d780cca7",
    "metadata": {},
    "outputs": [
@@ -661,7 +660,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 460,
+   "execution_count": 15,
    "id": "4ae681e4",
    "metadata": {},
    "outputs": [
@@ -693,7 +692,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 461,
+   "execution_count": 16,
    "id": "e8c4ce02",
    "metadata": {},
    "outputs": [
@@ -711,7 +710,7 @@
        "<IPython.lib.display.Audio object>"
       ]
      },
-     "execution_count": 461,
+     "execution_count": 16,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -731,7 +730,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 12,
+   "execution_count": 17,
    "id": "cca944e1",
    "metadata": {},
    "outputs": [],
@@ -747,7 +746,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 417,
+   "execution_count": 18,
    "id": "5706f45c",
    "metadata": {},
    "outputs": [],
@@ -781,7 +780,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 419,
+   "execution_count": 19,
    "id": "69d451f5",
    "metadata": {},
    "outputs": [],
@@ -873,7 +872,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 462,
+   "execution_count": 20,
    "id": "3915dc37",
    "metadata": {},
    "outputs": [
@@ -908,7 +907,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 463,
+   "execution_count": 21,
    "id": "3091d6f5",
    "metadata": {},
    "outputs": [
@@ -926,7 +925,7 @@
        "<IPython.lib.display.Audio object>"
       ]
      },
-     "execution_count": 463,
+     "execution_count": 21,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -954,7 +953,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 464,
+   "execution_count": 22,
    "id": "d0313891",
    "metadata": {},
    "outputs": [
@@ -988,7 +987,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 465,
+   "execution_count": 23,
    "id": "b7518435",
    "metadata": {},
    "outputs": [
@@ -1006,7 +1005,7 @@
        "<IPython.lib.display.Audio object>"
       ]
      },
-     "execution_count": 465,
+     "execution_count": 23,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -1026,7 +1025,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 15,
+   "execution_count": 24,
    "id": "3a1be0da",
    "metadata": {},
    "outputs": [],
@@ -1051,7 +1050,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 16,
+   "execution_count": 25,
    "id": "328c0eee",
    "metadata": {},
    "outputs": [],
@@ -1155,7 +1154,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 466,
+   "execution_count": 26,
    "id": "cca48f75",
    "metadata": {},
    "outputs": [
@@ -1182,7 +1181,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 467,
+   "execution_count": 27,
    "id": "fcfd59e8",
    "metadata": {},
    "outputs": [
@@ -1200,7 +1199,7 @@
        "<IPython.lib.display.Audio object>"
       ]
      },
-     "execution_count": 467,
+     "execution_count": 27,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -1220,7 +1219,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 165,
+   "execution_count": 28,
    "id": "8ccaeae1",
    "metadata": {},
    "outputs": [],
@@ -1341,7 +1340,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 468,
+   "execution_count": 29,
    "id": "0ccb9512",
    "metadata": {},
    "outputs": [
@@ -1368,7 +1367,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 469,
+   "execution_count": 30,
    "id": "452cbc86",
    "metadata": {},
    "outputs": [
@@ -1386,7 +1385,7 @@
        "<IPython.lib.display.Audio object>"
       ]
      },
-     "execution_count": 469,
+     "execution_count": 30,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -1420,7 +1419,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 210,
+   "execution_count": 31,
    "id": "a23ff9eb",
    "metadata": {},
    "outputs": [],
@@ -1632,7 +1631,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 470,
+   "execution_count": 32,
    "id": "48a8041b",
    "metadata": {},
    "outputs": [
@@ -1659,7 +1658,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 471,
+   "execution_count": 33,
    "id": "a8cac01a",
    "metadata": {},
    "outputs": [
@@ -1677,7 +1676,7 @@
        "<IPython.lib.display.Audio object>"
       ]
      },
-     "execution_count": 471,
+     "execution_count": 33,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -1697,7 +1696,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 472,
+   "execution_count": 34,
    "id": "f99e212c",
    "metadata": {},
    "outputs": [
@@ -1732,7 +1731,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 473,
+   "execution_count": 35,
    "id": "b31616ab",
    "metadata": {},
    "outputs": [
@@ -1750,7 +1749,7 @@
        "<IPython.lib.display.Audio object>"
       ]
      },
-     "execution_count": 473,
+     "execution_count": 35,
      "metadata": {},
      "output_type": "execute_result"
     }