The working language.
WHY IT DOMINATES
The libraries, overwhelmingly.
WHAT THE CORE LIBRARIES ARE
Numerical arrays and operations Tabular data handling Classical machine learning Deep learning frameworks Plotting
WHAT NUMERICAL ARRAYS PROVIDE
Vectorised operations, implemented in compiled code.
WHY THAT MATTERS
Loops in Python are slow; array operations are not.
WHAT TO AVOID
Iterating row by row over tabular data Growing lists in loops where an array operation exists Unnecessary copying of large structures
WHAT BROADCASTING IS
Operations between arrays of different shapes, expanded automatically.
WHY IT MATTERS
It expresses many operations without loops, but silently produces wrong shapes when misunderstood.
WHAT TO ALWAYS CHECK
Array shapes, at each step.
WHAT TYPE ISSUES CAUSE
Silent precision loss Memory use far above expectation Identifiers becoming floating point
WHAT TO SPECIFY
Types explicitly, when reading data.
WHAT TO LEARN BEYOND THE LIBRARIES
Packaging Testing Virtual environments Profiling
WHY
They separate experimental code from code that can ship.