On 14/08/20 9:05 pm, Marco Sulla wrote:
Another big problem with tensors is the covariance and contravariance. Usually in informatic you denote the covariance with the subscript operator, that on paper is written as subscript. Contravariant index on the contrary is a superscript. Not sure how a programming language can easily represent it.
I'm not sure the language *should* be representing it. If it does, there might be an expectation that you can supply an index as raised or lowered at your discretion and have it do the right thing automatically. But the "right thing" involves multiplying by a tensor that's a kind of implied global parameter to everything, and in Python we tend to frown on both implicit things and global things. I'm inclined to think that whether an array is a tensor or not isn't a language-level issue, but is a matter of interpretation. Just as a 1D array might represent a vector, or it might not, depending on how its contents are interpreted. -- Greg _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/YMXGSVRAHFIMDGZWBNMKT2ZRUGCHZ7ZT/ Code of Conduct: http://python.org/psf/codeofconduct/