On 5 January 2015 at 20:40, Colin J. Williams <cjwilliams43@gmail.com> wrote:

This illustrates a failure, which is reported later in the calculation:

A2= np.matrix([[1, 2, -2], [-3, -1, 4], [4, 2 -6]])

Here 2 - 6 is treated as an expression.

There should be a comma between 2 and -6. The rectangularity is checked, and in this case, it is not fulfilled. As such, NumPy creates a square matrix of size 1x1 of dtype object.

If you want to make sure what you have manually inputed is correct, you should include a couple of assertions afterwards.

/David.