Created
July 31, 2015 03:03
-
-
Save mu-777/e47dc68e00886d028f1c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
# np.matrix and np.mat | |
m = np.matrix([[1,2],[3,4]]) | |
a = np.matrix(m) | |
b = np.mat(m) | |
c = np.matrix(m, copy=False) | |
# all m, a, b, c is matrix([[1, 2],[3, 4]]) | |
m[0,0] = 10 | |
# all m, b, c is matrix([[10, 2],[3, 4]]) | |
# a is matrix([[1, 2],[3, 4]]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment