Skip to content

Commit

Permalink
Update syntax.md (#5575)
Browse files Browse the repository at this point in the history
  • Loading branch information
neozhaoliang committed Aug 1, 2022
1 parent b3ac33a commit d8a0008
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/lang/articles/kernels/syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def error_multiple_return() -> (ti.i32, ti.f32):

```python
@ti.kernel
def test_sign(x):
def test_sign(x: float) -> float:
if x >= 0:
return 1.0
else:
Expand All @@ -161,7 +161,7 @@ As a workaround, you can save the result in a local variable and return it at th

```python
@ti.kernel
def test_sign(x):
def test_sign(x: float) -> float:
sign = 1.0
if x < 0:
sign = -1.0
Expand Down

0 comments on commit d8a0008

Please sign in to comment.