import numpy as np
# Create a random 10x2 matrix of Cartesian coordinates
cartesian = np.random.rand(10, 2)
# Convert to polar coordinates using np.linalg.norm() and np.arctan2()
r = np.linalg.norm(cartesian, axis=1)
theta = np.arctan2(cartesian[:, 1], cartesian[:, 0])
# Create a new 10x2 matrix of polar coordinates
polar = np.column_stack((r, theta))
print("Cartesian coordinates:")
print(cartesian)
print("Polar coordinates:")
print(polar)