import numpy as np
B = np.arange(3)
print (B)
print (np.sqrt(B)) #求平方根

sqrt函数-风君雪科技博客