I want to normalize each row of a matrix by dividing all its elements by the maximum value in the row. What is the Pythonic way to do this?

E.g.

The original matrix is

[[1, 2, 3],

[4, 5, 6],

[7, 8, 9]]

The output should be

[[0.33333333, 0.66666667, 1]

[0.66666667, 0.83333333, 1]

[0.77777778, 0.88888889, 1]]

E.g.

The original matrix is

[[1, 2, 3],

[4, 5, 6],

[7, 8, 9]]

The output should be

[[0.33333333, 0.66666667, 1]

[0.66666667, 0.83333333, 1]

[0.77777778, 0.88888889, 1]]