Skip to content

Commit

Permalink
Update euler.py for deprecated get_cmap function in Matplotlib
Browse files Browse the repository at this point in the history
taichi/examples/simulation/euler.py:436: MatplotlibDeprecationWarning: The get_cmap function was deprecated in Matplotlib 3.7 and will be removed in 3.11. Use ``matplotlib.colormaps[name]`` or ``matplotlib.colormaps.get_cmap()`` or ``pyplot.get_cmap()`` instead.
  cmap = cm.get_cmap(cmap_name)
  • Loading branch information
bluevisor authored Nov 10, 2024
1 parent e9f19b8 commit f97a037
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/taichi/examples/simulation/euler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from matplotlib import cm
from matplotlib import colormaps

import taichi as ti

Expand Down Expand Up @@ -433,7 +433,7 @@ def paint():

def main():
gui = ti.GUI("Euler Equations", (res, res))
cmap = cm.get_cmap(cmap_name)
cmap = colormaps[cmap_name]
set_ic()
set_bc()

Expand Down

0 comments on commit f97a037

Please sign in to comment.