EXAMPLES:
- >>> A = matrix([[1,2],[3,4]])
- >>> print(A)
- [ 1 3]
- [ 2 4]
- <BLANKLINE>
+ >>> A = matrix([[1,2],[3,4]])
+ >>> print(A)
+ [ 1 3]
+ [ 2 4]
+ <BLANKLINE>
- >>> print(vec(A))
- [ 1]
- [ 2]
- [ 3]
- [ 4]
- <BLANKLINE>
+ >>> print(vec(A))
+ [ 1]
+ [ 2]
+ [ 3]
+ [ 4]
+ <BLANKLINE>
+
+ Note that if ``real_matrix`` is a vector, this function is a no-op:
+
+ >>> v = matrix([1,2,3,4], (4,1))
+ >>> print(v)
+ [ 1]
+ [ 2]
+ [ 3]
+ [ 4]
+ <BLANKLINE>
+ >>> print(vec(v))
+ [ 1]
+ [ 2]
+ [ 3]
+ [ 4]
+ <BLANKLINE>
"""
return matrix(real_matrix, (len(real_matrix), 1))