In [7]:
import numpy as np
import math
import matplotlib.pyplot as plt
%matplotlib inline
In [8]:
def ReLu(x):
a = []
for item in x:
a.append(item * (item>0))
return a
In [9]:
x = np.arange(-10., 10., 1)
rel = ReLu(x)
In [10]:
#x
In [11]:
#rel
In [12]:
plt.plot(x,rel)
plt.show()
In [ ]: