In [1]:
import numpy as np

In [2]:
arr = np.arange(11)

In [3]:
arr


Out[3]:
array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10])

In [4]:
np.sqrt(arr)


Out[4]:
array([ 0.        ,  1.        ,  1.41421356,  1.73205081,  2.        ,
        2.23606798,  2.44948974,  2.64575131,  2.82842712,  3.        ,
        3.16227766])

In [5]:
np.exp(arr)


Out[5]:
array([  1.00000000e+00,   2.71828183e+00,   7.38905610e+00,
         2.00855369e+01,   5.45981500e+01,   1.48413159e+02,
         4.03428793e+02,   1.09663316e+03,   2.98095799e+03,
         8.10308393e+03,   2.20264658e+04])

In [6]:
A = np.random.randn(10)

In [7]:
A


Out[7]:
array([-1.7588587 ,  1.69239648, -0.54046408,  0.86592485, -1.06230612,
       -2.23772266, -0.77568571,  1.01278207,  0.54995166,  0.06422287])

In [8]:
B = np.random.randn(10)
B


Out[8]:
array([-0.07565413,  0.06587312, -0.15938146,  0.2495696 , -0.65654823,
       -0.74855439,  0.610251  ,  0.2557089 ,  0.30805733,  0.32563176])

In [9]:
np.add(A, B)


Out[9]:
array([-1.83451283,  1.7582696 , -0.69984554,  1.11549445, -1.71885434,
       -2.98627705, -0.1654347 ,  1.26849097,  0.858009  ,  0.38985462])

In [10]:
np.maximum(A,B)


Out[10]:
array([-0.07565413,  1.69239648, -0.15938146,  0.86592485, -0.65654823,
       -0.74855439,  0.610251  ,  1.01278207,  0.54995166,  0.32563176])

In [11]:
import webbrowser
website = 'http://docs.scipy.org'
webbrowser.open(website)


Out[11]:
True

In [ ]: