new_mat = A does not create a new matrix. You have merely given a new name to the object you also knew as A. If it's a list of lists of numbers, you might want to use copy.deepcopy to create a full copy, and if it's a numpy array you...
java,class,private,public,aliasing
Objects aren't private or public. Fields can be private or public. Fields can hold references to objects. An object can be referred to by both private and public fields simultaneously: public class Example { public static Object a; private static Object b; public static void main(String... args) { Object foo...