|
|
|
|
|
by lordgrenville
2156 days ago
|
|
I was with you until your last line, which I categorically disagree with. These two alternatives perfectly map to two different ways of thinking about the vector c: - As a regular array (for someone with Python experience but no knowledge of linear algebra). In this case you can just loop over it as with any iterable. - As a vector, with the associated mathematical properties. In this case you can operate on the entire vector, which is much faster; this happens to be because of implementation details (using C structures instead of Python lists, parallelisation, whatever), but is also just highly intuitive. I'd argue that this is exactly what Tao is saying, about how different notations suit different contexts, and that allowing both methods in no way violates the Zen of Python (in reference to jimhefferon's comment). |
|