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] committed Aug 22, 2022
1 parent 4b08063 commit 71b6fb5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions python/taichi/lang/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ def cmp_lt(a, b):
Union[:class:`~taichi.lang.expr.Expr`, bool]: True if LHS is strictly smaller than RHS, False otherwise
"""
return _binary_operation(_ti_core.expr_cmp_lt,lambda a,b: int(a < b),a,
return _binary_operation(_ti_core.expr_cmp_lt, lambda a, b: int(a < b), a,
b)


Expand All @@ -933,8 +933,8 @@ def cmp_le(a, b):
Union[:class:`~taichi.lang.expr.Expr`, bool]: True if LHS is smaller than or equal to RHS, False otherwise
"""
return _binary_operation(_ti_core.expr_cmp_le,lambda a,b: int(a <= b),
a,b)
return _binary_operation(_ti_core.expr_cmp_le, lambda a, b: int(a <= b), a,
b)


@binary
Expand All @@ -949,7 +949,7 @@ def cmp_gt(a, b):
Union[:class:`~taichi.lang.expr.Expr`, bool]: True if LHS is strictly larger than RHS, False otherwise
"""
return _binary_operation(_ti_core.expr_cmp_gt,lambda a,b: int(a > b),a,
return _binary_operation(_ti_core.expr_cmp_gt, lambda a, b: int(a > b), a,
b)


Expand All @@ -965,8 +965,8 @@ def cmp_ge(a, b):
bool: True if LHS is greater than or equal to RHS, False otherwise
"""
return _binary_operation(_ti_core.expr_cmp_ge,lambda a,b: int(a >= b),
a,b)
return _binary_operation(_ti_core.expr_cmp_ge, lambda a, b: int(a >= b), a,
b)


@binary
Expand All @@ -981,8 +981,8 @@ def cmp_eq(a, b):
Union[:class:`~taichi.lang.expr.Expr`, bool]: True if LHS is equal to RHS, False otherwise.
"""
return _binary_operation(_ti_core.expr_cmp_eq,lambda a,b: int(a == b),
a,b)
return _binary_operation(_ti_core.expr_cmp_eq, lambda a, b: int(a == b), a,
b)


@binary
Expand All @@ -997,8 +997,8 @@ def cmp_ne(a, b):
Union[:class:`~taichi.lang.expr.Expr`, bool]: True if LHS is not equal to RHS, False otherwise
"""
return _binary_operation(_ti_core.expr_cmp_ne,lambda a,b: int(a != b),
a,b)
return _binary_operation(_ti_core.expr_cmp_ne, lambda a, b: int(a != b), a,
b)


@binary
Expand Down
2 changes: 1 addition & 1 deletion tests/python/test_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,5 +219,5 @@ def foo():

@test_utils.test()
def test_python_scope_compare():
v = ti.math.vec3(0,1,2)
v = ti.math.vec3(0, 1, 2)
assert (v < 1)[0] == 1

0 comments on commit 71b6fb5

Please sign in to comment.