On 5 January 2015 at 20:40, Colin J. Williams <cjwilliam...@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.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion