Sep-19-2018, 09:02 PM
I have 3 magic squares like this:
2,7,6
9,5,1
4,3,8
(The Sum is: 15)
-----
2,9,4
7,5,3
6,1,8
(The Sum is: 15)
2,11,5
9,6,3
7,1,10
(The sum is: 18)
The firt two contain the same numbers in different positions and i would like to print only one of them in addition to square magic of sum 18.
I desire, in other words, to eliminate the matrix that uses the same number and to obtain:
2,7,6
9,5,1
4,3,8
2,11,5
9,6,3
7,1,10
With the list is used "set", with numpy array is used "np.unique", but what to use for the matrixes?
Thanks
2,7,6
9,5,1
4,3,8
(The Sum is: 15)
-----
2,9,4
7,5,3
6,1,8
(The Sum is: 15)
2,11,5
9,6,3
7,1,10
(The sum is: 18)
The firt two contain the same numbers in different positions and i would like to print only one of them in addition to square magic of sum 18.
I desire, in other words, to eliminate the matrix that uses the same number and to obtain:
2,7,6
9,5,1
4,3,8
2,11,5
9,6,3
7,1,10
With the list is used "set", with numpy array is used "np.unique", but what to use for the matrixes?
Thanks