Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and taichi-gardener committed Oct 31, 2022
1 parent 61ec6e0 commit 47e4474
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/taichi/lang/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from taichi._lib import core as _ti_core
from taichi.lang import expr, impl
from taichi.lang.exception import TaichiSyntaxError
from taichi.lang.util import cook_dtype, is_taichi_class, taichi_scope
from taichi.lang.field import Field
from taichi.lang.util import cook_dtype, is_taichi_class, taichi_scope

unary_ops = []

Expand Down Expand Up @@ -82,7 +82,8 @@ def cab_foo(c, a, b):

@functools.wraps(foo)
def wrapped(a, b, c):
if isinstance(a, Field) or isinstance(b, Field) or isinstance(c, Field):
if isinstance(a, Field) or isinstance(b, Field) or isinstance(
c, Field):
return NotImplemented
if is_taichi_class(a):
return a._element_wise_ternary(abc_foo, b, c)
Expand Down

0 comments on commit 47e4474

Please sign in to comment.