it's how the basic linear algebra subprograms are implemented
it's how the basic linear algebra subprograms are implemented
it's how the basic linear algebra subprograms are implemented
comrade numpy o7
Okay, now do it by percent of processor (CPU/GPU/whatever) cycles.
Although, TBF, you can replace it all with C/C++. Or Rust, assume the optimisation has gotten good enough. It's just that few people are both qualified for and interested in rewriting numerical linear algebra algorithms, and there's no real reason to if the Fortran works.
I'll never understand why my classmates prefer python to R.
Because R is incredibly clunky. I've worked with both and never got the hang of R.
import numpy as np temp = np.array([22, 21, 25, 23]) sd_temp = np.std(temp, ddof=1) print(sd_temp)
Vs
temp <- c(22, 21, 25, 23) sd(temp)
How in the world is R more clunky than python?
Edit: and I didn't even mention how python likes to break unrelated software packages whenever I'm forced to use it.
I like my memes to come with a bibliography.
When you download R, youre downloading C++/C and Fortran
Everything is just silicon oxide gates being saturated and drained and turned on and off in various patterns very rapidly in a way that means something to us. That Fortran/C/C++/Assembly depends on that tiny two-MOSFET AND gate in the ALU to do the AND correctly every time.
Programming languages at the basic level are just an automated way of putting numbers into a calculator, processing them, and getting another number/status/flag back and doing something else with it based on the result.
meanwhile, me trying to get a feeling for how fast A GHz is by waving my arm as fast as I can:
Well I be damned. What does the Fortran do ?
Array operations in FORTRAN are much easier for the compiler heavily optimize than it is in c/c++ due to its array model and type system. You can achieve much of the same thing with modern compiler extensions, but it’s difficult and not as portable.
That's interesting, thanks
Its just easy to write super-optimised code snippets in without having to break out into assembly.
But numpy is written in python and c/c++?
Numpy can use BLAS packages that are partly written in Fortran
What does it say under the Languages section for that repo?
It provides:
- a powerful N-dimensional array object
- sophisticated (broadcasting) functions
- tools for integrating C/C++ and Fortran code
- useful linear algebra, Fourier transform, and random number capabilities
Not according to the repo I sourced from your message.
“Tools for integrating” is not “written in”, try again
“* A Fortran compiler is needed only for running the f2py
tests. The instructions below include a Fortran compiler, however you can safely leave it out.” from https://numpy.org/devdocs/building/index.html#building-from-source