Category Python Modules

Modules is one of the best feature of Python. Except some core modules, you can install what you need and keep your Python setup smooth.

Python np.argmax() function

Python np.argmax() function

With `axis=0` on a 2×3 array, the result has one row index for each column. I like how that lets each column identify its own winning position. Those indices can guide a separate lookup for each column’s winner. `np.argmax` returns…

Numpy linalg.norm – Matrix or vector norm

Numpy linalg.norm - Matrix or vector norm

A matrix of feature rows can produce one output from `np.linalg.norm(matrix)`, even when the next step needs a length for each row. I was curious that `axis=1` can preserve that row-by-row view without changing the matrix. A norm reports size…