| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Optional only takes one argument. It must be Optional[Union[...]] to be valid.
Since the default is an integer, None is not defined.
|
I changed the annotation for the axis argument to stack from Optional[int] to just int, since the default is 0 rather than None. However, I'm not sure if this should be done, so I can revert it if we think the Optional is better. It's worth noting that np.stack(axis=None) gives an error. |
Sorry, something went wrong.
endpoint=None is not defined, so it should not be Optional.
|
I also changed the endpoint argument of linspace to be bool instead of Optional[bool]. Perhaps there was just some confusion about the difference between Optional[x], which is a shorthand for Union[x, None] (see https://docs.python.org/3/library/typing.html#typing.Optional), and keyword-only arguments with default values, which may be None or something else. |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for catching this!
Sorry, something went wrong.
No. Just a copy and paste error. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This also removes the dtype from the where() type annotation. We should document input and output dtypes (#98), but type annotations aren't the right place to do this.