Unexpected conversion from matrix to array

Dec. 5, 2007
6:30 p.m.
import numpy.matlib as M x = M.asmatrix(['a', 'b', 'c']) x == 'a' array([[ True, False, False]], dtype=bool) # <---- I expected a matrix
x = M.asmatrix([1, 2, 3]) x == 1 matrix([[ True, False, False]], dtype=bool) # <---- This looks good
M.__version__ '1.0.5.dev4445'
6275
Age (days ago)
6275
Last active (days ago)
0 comments
1 participants
participants (1)
-
Keith Goodman