-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replaces
convert_inputs_to_tensors
decorator with a better decorator
- Replaces `convert_inputs_to_tensors` decorator with `convert_to_tensors`, which will convert any `TensorLike` arguments by default and sync data types according to any specified data type constraints. This means that information does not need to be duplicated in the decorator like it used to be. - Disallows unsafe downcasting in the new `convert_to_tensors` decorator. Previously, you could have: ```py x = tp.Tensor([1], dtype=tp.int32) x * 3.99 ``` which would yield a result equal to: ```py tp.Tensor([3]) ``` due to truncation when casting. - Fixes several type annotations for binary elementwise ops.
- Loading branch information
1 parent
f3fe6bd
commit 7c6997d
Showing
17 changed files
with
336 additions
and
564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.