4 ms·
> While you have to use np.linalg.norm in Python to compute the norm of a vector, Fortran natively has the norm2 function for that. No That's what sucks in pyt
by hulitu 1y ago
> While you have to use np.linalg.norm in Python to compute the norm of a vector, Fortran natively has the norm2 function for that. No
That's what sucks in python as a newbie. Wanted to play with random, which python docs says it's a builtin. Obscure error message. Search the internet, no fix in sight. After more searching i found out that i actually have to "import random" (builtin ??) and use a method ? Wtf.
So definitely python is not for newbies. Fortran code is much easier to underestand.
- talideon 1y agoThe Python docs say it's part of the built-in standard library, not that it's literally there and in scope by default. We learned the value of modularity decades ago. This is a sign of Fortran's age, not a good thing. Very few modern languages that aren't heavily domain-specific will have more than a bare minimum of functions in scope by default without needing to import them or a module containing them. The only relatively counterexample I can think of is PHP, and even it's grown namespaces over the years.