4 ms·
I love mypy and use it in my job. I would love to use it for personal pytorch projects, but only if I could type-check that tensors are the correct shape, etc.
by bravura 6y ago
I love mypy and use it in my job.
I would love to use it for personal pytorch projects, but only if I could type-check that tensors are the correct shape, etc. Is that possible?
- ali_m 6y agoVariadic generics should make this possible in future: https://www.python.org/dev/peps/pep-0646/ https://www.python.org/dev/peps/pep-0646/
- galimaufry 6y agoI was just thinking about this. Seems like it could also be great if the type system could make a distinction between vectors and dual vectors, alleviating "you got the wrong axis" errors. But maybe for something like that you really need vector space objects like in Sage.