Issue
I have a function that has to take two arguments, like:
def f(first_arg: int, unused_arg) -> int:
first_arg += 1
return first_arg
I want to type my function, what should be the type of unused_arg ? From this question I guess None
could be used.
For context, I'm using lax.scan
from jax
which needs a function with two arguments even when the second one is unused.
Solution
You can use Any
?
from typing import Any
def f(first_arg: int, unused_arg: Any) -> int:
...
Answered By - Corralien
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.