Numpy Matrix keeps giving me an Error,

Posted by uberjumper on Stack Overflow See other posts from Stack Overflow or by uberjumper
Published on 2010-03-24T22:56:26Z Indexed on 2010/03/24 23:03 UTC
Read the original article Hit count: 261

Filed under:
|

Okay this is werid, i keep getting the error, randomly.

ValueError: matrix must be 2-dimensional

So i tracked it down, and cornered it to basically something like this:

a_list = [[(1,100) for _ in range(32)] for _ in range(32)]
numpy.matrix(a_list)

Whats wrong with this? If i print a_list it is clearly a 2d matrix of tuples, however numpy does not believe so.

© Stack Overflow or respective owner

Related posts about numpy

Related posts about python