Skip to content

Commit e522eeb

Browse files
committed
Update exercise02.ipynb
1 parent 5762cd8 commit e522eeb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

exercise02.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@
5757
"outputs": [],
5858
"source": [
5959
"import librosa\n",
60+
"import matplotlib as mpl\n",
6061
"import matplotlib.pyplot as plt\n",
6162
"import numpy as np\n",
6263
"import os\n",
6364
"import pyloudnorm as pyln\n",
6465
"import warnings\n",
65-
"from matplotlib.cm import get_cmap\n",
6666
"from matplotlib.colors import BoundaryNorm\n",
6767
"from scipy.io import wavfile\n",
6868
"from scipy.signal import resample, stft, welch\n",
@@ -110,7 +110,7 @@
110110
"def set_cmap(xmax, dbrange):\n",
111111
" \"\"\"cmap for STFT 20log10(|X[t,f]|) in dB.\"\"\"\n",
112112
" col_tick = np.linspace(xmax - dbrange, xmax, dbrange, endpoint=True)\n",
113-
" cmap = get_cmap(\"magma\").copy()\n",
113+
" cmap = mpl.colormaps[\"magma\"].copy()\n",
114114
" cmap.set_over(\"C3\")\n",
115115
" cmap.set_under(\"C7\")\n",
116116
" norm = BoundaryNorm(col_tick, cmap.N)\n",
@@ -444,7 +444,7 @@
444444
"name": "python",
445445
"nbconvert_exporter": "python",
446446
"pygments_lexer": "ipython3",
447-
"version": "3.10.6"
447+
"version": "3.12.3"
448448
}
449449
},
450450
"nbformat": 4,

0 commit comments

Comments
 (0)