nshutils 0.11.1__tar.gz → 0.11.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nshutils-0.11.1 → nshutils-0.11.2}/PKG-INFO +4 -4
- {nshutils-0.11.1 → nshutils-0.11.2}/README.md +3 -3
- {nshutils-0.11.1 → nshutils-0.11.2}/pyproject.toml +1 -1
- {nshutils-0.11.1 → nshutils-0.11.2}/src/nshutils/__init__.py +0 -0
- {nshutils-0.11.1 → nshutils-0.11.2}/src/nshutils/actsave/__init__.py +0 -0
- {nshutils-0.11.1 → nshutils-0.11.2}/src/nshutils/actsave/_loader.py +0 -0
- {nshutils-0.11.1 → nshutils-0.11.2}/src/nshutils/actsave/_saver.py +0 -0
- {nshutils-0.11.1 → nshutils-0.11.2}/src/nshutils/collections.py +0 -0
- {nshutils-0.11.1 → nshutils-0.11.2}/src/nshutils/logging.py +0 -0
- {nshutils-0.11.1 → nshutils-0.11.2}/src/nshutils/snoop.py +0 -0
- {nshutils-0.11.1 → nshutils-0.11.2}/src/nshutils/typecheck.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nshutils
|
3
|
-
Version: 0.11.
|
3
|
+
Version: 0.11.2
|
4
4
|
Summary:
|
5
5
|
Author: Nima Shoghi
|
6
6
|
Author-email: nimashoghi@gmail.com
|
@@ -46,10 +46,10 @@ typecheck_this_module()
|
|
46
46
|
You can also use the `tassert` function to assert that a value is of a certain type:
|
47
47
|
|
48
48
|
```python
|
49
|
-
|
49
|
+
import nshutils.typecheck as tc
|
50
50
|
|
51
|
-
def my_function(x:
|
52
|
-
tassert(
|
51
|
+
def my_function(x: tc.Float[torch.Tensor, "bsz seq len"]) -> tc.Float[torch.Tensor, "bsz seq len"]:
|
52
|
+
tc.tassert(tc.Float[torch.Tensor, "bsz seq len"], x)
|
53
53
|
...
|
54
54
|
```
|
55
55
|
|
@@ -25,10 +25,10 @@ typecheck_this_module()
|
|
25
25
|
You can also use the `tassert` function to assert that a value is of a certain type:
|
26
26
|
|
27
27
|
```python
|
28
|
-
|
28
|
+
import nshutils.typecheck as tc
|
29
29
|
|
30
|
-
def my_function(x:
|
31
|
-
tassert(
|
30
|
+
def my_function(x: tc.Float[torch.Tensor, "bsz seq len"]) -> tc.Float[torch.Tensor, "bsz seq len"]:
|
31
|
+
tc.tassert(tc.Float[torch.Tensor, "bsz seq len"], x)
|
32
32
|
...
|
33
33
|
```
|
34
34
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|