()
| 222 | |
| 223 | |
| 224 | def test_not_pattern(): |
| 225 | no_shape233 = ~wildcard().has_shape((2, 3, 3)) |
| 226 | assert isinstance(no_shape233, NotPattern) |
| 227 | assert no_shape233.match(rx.Var("x", R.Tensor((3, 3, 3), "float32"))) |
| 228 | assert not no_shape233.match(rx.Var("x", R.Tensor((2, 3, 3), "float32"))) |
| 229 | |
| 230 | |
| 231 | def test_dtype_pattern(): |