Code and comments

Practical and theoretical aspects of software development

Posts Tagged ‘numpy

The first thing you should know about matrices.

When you look at NumPy, Python’s numerical library, the first object you will encounter is the ndarray, or n-dimensional array. Also known as a matrix, right? Wait, there is also a matrix class in the linalg submodule, that can’t be right. And worse, matrix is not nearly as general as ndarray, it only allows two dimensions. Is that really good enough for real-world data?

Based on experience in higher education, I’m confident that over 90% of those that have seen matrices missed the point. If you don’t know why a matrix must have exactly two dimensions, than you don’t know what a matrix really is. (So read on.)

Read the rest of this entry »


Written by Eric Wilson

September 15, 2011 at 9:52 pm

Posted in didactics

Tagged with , , ,