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

dshape is not a type #240

Open
reversefold opened this issue Feb 21, 2020 · 1 comment
Open

dshape is not a type #240

reversefold opened this issue Feb 21, 2020 · 1 comment

Comments

@reversefold
Copy link

reversefold commented Feb 21, 2020

When using a datashape.dshape in typing.Tuple I get a runtime error saying that the dshape is not a type:

In [10]: typing.Tuple[datashape.dshape("3 * float64")]
...
TypeError: Tuple[t0, t1, ...]: each t must be a type. Got dshape("3 * float64").
@reversefold
Copy link
Author

I'm actually struggling to figure out what datashape is for.... As its own library it seems like it doesn't serve any purpose if it can't be used for type hinting. The documentation talks about the grammar and what types can be modeled but what is the utility of that? What can one do with that information once it has been defined?

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

1 participant