[Solved] Using Numpy to update one column by the square root of those column values [closed]


As rafaelc suggested, you can use np.sqrt on a specific column.

a = np.array([[1.,2.,3.],[1.,2.,3.]])
a[:,1] = np.sqrt(a[:,1])

a has two rows and three columns. a[:,1] is the second column.

1

solved Using Numpy to update one column by the square root of those column values [closed]