Skip to content

Commit f76442f

Browse files
authored
Update README.md
1 parent 0e72a64 commit f76442f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ from beartype import beartype
9090

9191
from phantom_tensors import dim_binding_scope, parse
9292
from phantom_tensors.torch import Tensor
93+
from phantom_tensors.alphabet import A, B, C
9394

9495
T1 = TypeVar("T1")
9596
T2 = TypeVar("T2")
@@ -110,11 +111,9 @@ x, y = parse(
110111
(tr.ones(3, 4), Tensor[A, B]),
111112
(tr.ones(4, 5), Tensor[B, C]),
112113
)
113-
x # static type checker sees: Tensor[A, B]
114-
y # static type checker sees: Tensor[B, C]
115114

116115
# At runtime beartype raises:
117-
# Function should return shape-(T1, T3) but returned shape-(T1, T1)
116+
# Function should return shape-(A, C) but returned shape-(A, A)
118117
z = buggy_matmul(x, y) # Runtime validation error!
119118

120119
```

0 commit comments

Comments
 (0)