I have following code:
a = np.arange(25).reshape(5,5)
b = np.arange(25).reshape(5,5)
c = a.astype( str )
d = b.astype( str )
Matrix a and b are:
array([[ 0, 1, 2, 3, 4],
[ 5, 6, 7, 8, 9],
[10, 11, 12, 13, 14],
[15, 16, 17, 18, 19],
[20, 21, 22, 23, 24]])
Matrix c and d are:
array([['0', '1', '2', '3', '4'],
['5', '6', '7', '8', '9'],
['10', '11', '12', '13', '14'],
['15', '16', '17', '18', '19'],
['20', '21', '22', '23', '24']], dtype='|S11')
I want to get the following matrix by using c and d manipulation.
array([['00', '11', '22', '33', '44'],
['55', '66', '77', '88', '99'],
['1010', '1110', '1212', '1313', '1414'],
['1515', '1616', '1717', '1818', '1919'],
['2020', '2121', '2222', '2323', '2424']], dtype='|S11')
How to do?