Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings of taichi examples #6741

Closed
PGZXB opened this issue Nov 25, 2022 · 0 comments · Fixed by #6740
Closed

Fix warnings of taichi examples #6741

PGZXB opened this issue Nov 25, 2022 · 0 comments · Fixed by #6740
Assignees

Comments

@PGZXB
Copy link
Contributor

PGZXB commented Nov 25, 2022

  • diff_sph
path\to\taichi\python\taichi\examples\autodiff\diff_sph\diff_sph.py:49: DeprecationWarning: Calling builtin function "max" in Taichi scope is deprecated. Please use "ti.max" instead.
  w[I] -= min(max(w.grad[I], -20.0), 20.0) * self.lr
D:\CODE\CPP_CODE\taichi\python\taichi\examples\autodiff\diff_sph\diff_sph.py:49: DeprecationWarning: Calling builtin function "min" in Taichi scope is deprecated. Please use "ti.min" instead.
  w[I] -= min(max(w.grad[I], -20.0), 20.0) * self.lr
D:\CODE\CPP_CODE\taichi\python\taichi\examples\autodiff\diff_sph\diff_sph.py:430: DeprecationWarning: Calling builtin function "max" in Taichi scope is deprecated. Please use "ti.max" instead.
  pre[bs, t, i] = pressure_scale * max(
  • euler
path\to\taichi\python\taichi\examples\simulation\euler.py:298: DeprecationWarning: Calling builtin function "min" in Taichi scope is deprecated. Please use "ti.min" instead.
  wmin = min(wr, wl)
D:\CODE\CPP_CODE\taichi\python\taichi\examples\simulation\euler.py:299: DeprecationWarning: Calling builtin function "max" in Taichi scope is deprecated. Please use "ti.max" instead.
  wmax = max(wr, wl)
  • fractal3d_ggui
path\to\taichi\python\taichi\examples\ggui_examples\fractal3d_ggui.py:136: DeprecationWarning: Calling builtin function "max" in Taichi scope is deprecated. Please use "ti.max" instead.
  return light_color * surface_color * max(0, dot(light_dir, normal))
  • mass_spring_3d_ggui
path\to\taichi\python\taichi\examples\ggui_examples\mass_spring_3d_ggui.py:113: DeprecationWarning: Calling builtin function "min" in Taichi scope is deprecated. Please use "ti.min" instead.
  v[i] -= min(v[i].dot(normal), 0) * normal
  • mciso_advanced
path\to\taichi\python\taichi\examples\algorithm\mciso_advanced.py:465: DeprecationWarning: Calling builtin function "max" in Taichi scope is deprecated. Please use "ti.max" instead.
  r = max(a + b - 0.08, 0)
  • mpm128
path\to\taichi\python\taichi\examples\simulation\mpm128.py:44: DeprecationWarning: Calling builtin function "min" in Taichi scope is deprecated. Please use "ti.min" instead.
  h = max(0.1, min(5, ti.exp(10 * (1.0 - Jp[p]))))
path\too\taichi\python\taichi\examples\simulation\mpm128.py:44: DeprecationWarning: Calling builtin function "max" in Taichi scope is deprecated. Please use "ti.max" instead.
  h = max(0.1, min(5, ti.exp(10 * (1.0 - Jp[p]))))
  • mpm128_ggui
path\to\taichi\python\taichi\examples\ggui_examples\mpm128_ggui.py:51: DeprecationWarning: Calling builtin function "min" in Taichi scope is deprecated. Please use "ti.min" instead.
  h = max(0.1, min(5, ti.exp(10 * (1.0 - Jp[p]))))
path\to\taichi\python\taichi\examples\ggui_examples\mpm128_ggui.py:51: DeprecationWarning: Calling builtin function "max" in Taichi scope is deprecated. Please use "ti.max" instead.
  h = max(0.1, min(5, ti.exp(10 * (1.0 - Jp[p]))))
  • mpm3d
path\to\taichi\python\taichi\__init__.py:85: DeprecationWarning: ti.block_dim is deprecated. Please use ti.loop_config(block_dim=...) instead.
  DeprecationWarning)
path\to\taichi\python\taichi\examples\simulation\mpm3d.py:63: DeprecationWarning: Using conditional expression for element-wise select operation on Taichi vectors/matrices is deprecated. Please use "ti.select" instead.
  F_grid_v[I] = 0 if cond else F_grid_v[I]
  • mpm3d_ggui
path\to\taichi\python\taichi\examples\ggui_examples\mpm3d_ggui.py:80: DeprecationWarning: Calling builtin function "max" in Taichi scope is deprecated. Please use "ti.max" instead.
  new_sig = min(max(sig[d, d], 1 - 2.5e-2),
path\to\taichi\python\taichi\examples\ggui_examples\mpm3d_ggui.py:80: DeprecationWarning: Calling builtin function "min" in Taichi scope is deprecated. Please use "ti.min" instead.
  new_sig = min(max(sig[d, d], 1 - 2.5e-2),
path\to\taichi\python\taichi\examples\ggui_examples\mpm3d_ggui.py:112: DeprecationWarning: Using conditional expression for element-wise select operation on Taichi vectors/matrices is deprecated. Please use "ti.select" instead.
  F_grid_v[I] = 0 if cond else F_grid_v[I]
  • mpm88_graph
path\to\taichi\python\taichi\__init__.py:79: DeprecationWarning: ti.any_arr is deprecated. Please use ti.types.ndarray instead.
  DeprecationWarning)
path\to\taichi\python\taichi\types\ndarray_type.py:91: DeprecationWarning: The field_dim argument for ndarray will be deprecated in v1.4.0, use ndim instead.
  DeprecationWarning)
  • mpm_lagrangian_forces
path\to\taichi\python\taichi\examples\simulation\mpm_lagrangian_forces.py:119: DeprecationWarning: Calling builtin function "min" in Taichi scope is deprecated. Please use "ti.min" instead.
  grid_v[i, j] -= dist * min(0, grid_v[i, j].dot(dist))
  • sdf_renderer
path\to\taichi\python\taichi\examples\rendering\sdf_renderer.py:66: DeprecationWarning: Calling builtin function "min" in Taichi scope is deprecated. Please use "ti.min" instead.
  wall = min(o[1] + 0.1, o[2] + 0.4)
path\to\taichi\python\taichi\examples\rendering\sdf_renderer.py:70: DeprecationWarning: Calling builtin function "max" in Taichi scope is deprecated. Please use "ti.max" instead.
  box = ti.Vector([max(0, q[0]), max(0, q[1]),
  • stable_fluid
path\to\taichi\python\taichi\examples\simulation\stable_fluid.py:101: DeprecationWarning: Calling builtin function "min" in Taichi scope is deprecated. Please use "ti.min" instead.
  I = max(0, min(res - 1, I))
path\to\taichi\python\taichi\examples\simulation\stable_fluid.py:101: DeprecationWarning: Calling builtin function "max" in Taichi scope is deprecated. Please use "ti.max" instead.
  I = max(0, min(res - 1, I))
  • stable_fluid_ggui
path\to\taichi\python\taichi\examples\ggui_examples\stable_fluid_ggui.py:53: DeprecationWarning: Calling builtin function "min" in Taichi scope is deprecated. Please use "ti.min" instead.
  I = max(0, min(res - 1, I))
path\to\taichi\python\taichi\examples\ggui_examples\stable_fluid_ggui.py:53: DeprecationWarning: Calling builtin function "max" in Taichi scope is deprecated. Please use "ti.max" instead.
  I = max(0, min(res - 1, I))
  • stable_fluid_graph
path\to\taichi\python\taichi\types\ndarray_type.py:91: DeprecationWarning: The field_dim argument for ndarray will be deprecated in v1.4.0, use ndim instead.
  DeprecationWarning)
running in graph mode
path\to\taichi\python\taichi\examples\graph\stable_fluid_graph.py:38: DeprecationWarning: Calling builtin function "min" in Taichi scope is deprecated. Please use "ti.min" instead.
  I = max(0, min(res - 1, I))
path\to\taichi\python\taichi\examples\graph\stable_fluid_graph.py:38: DeprecationWarning: Calling builtin function "max" in Taichi scope is deprecated. Please use "ti.max" instead.
  I = max(0, min(res - 1, I))
  • taichi_sparse
path\to\taichi\python\taichi\lang\matrix.py:1080: DeprecationWarning: `ti.Matrix.rotation2d()` will be removed in release v1.4.0. Use `ti.math.rotation2d()` instead.
  DeprecationWarning)
  • texture_graph
path\to\taichi\python\taichi\types\ndarray_type.py:91: DeprecationWarning: The field_dim argument for ndarray will be deprecated in v1.4.0, use ndim instead.
  DeprecationWarning)
@taichi-gardener taichi-gardener moved this to Untriaged in Taichi Lang Nov 25, 2022
@PGZXB PGZXB self-assigned this Nov 25, 2022
Repository owner moved this from Untriaged to Done in Taichi Lang Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant