#!/usr/bin/python3 import numpy as np # Please do not change the below function name and parameters def transform(u1,u2): z1 = np.sqrt(-2* np.log(u1)) * np.cos(2*np.pi*u2) z2 = np.sqrt(-2* np.log(u1)) * np.sin(2*np.pi*u2) return (z1,z2)
#!/usr/bin/python3 import numpy as np # Please do not change the below function name and parameters def transform(u1,u2): z1 = np.sqrt(-2* np.log(u1)) * np.cos(2*np.pi*u2) z2 = np.sqrt(-2* np.log(u1)) * np.sin(2*np.pi*u2) return (z1,z2)