Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value of type "TensorShape" is not indexable #10

Open
drasmuss opened this issue Oct 12, 2022 · 1 comment
Open

Value of type "TensorShape" is not indexable #10

drasmuss opened this issue Oct 12, 2022 · 1 comment

Comments

@drasmuss
Copy link

Here is an example demonstrating the issue:

import tensor_annotations.tensorflow as ttf
import tensorflow as tf

x: ttf.Tensor1 = tf.zeros((10,))

print(x.shape[0])

This is valid code, but running a type checker (such as mypy) reports

tmp/tmp.py:6: error: Value of type "TensorShape" is not indexable
@mrahtz
Copy link
Collaborator

mrahtz commented Oct 15, 2022

Thanks for the report! I'll push a fix on Monday or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants