-
Notifications
You must be signed in to change notification settings - Fork 1
/
python-scipy-modülü-2.py
59 lines (39 loc) · 1.46 KB
/
python-scipy-modülü-2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
"""
) ( (
( /( )\ ) )\ ( ) ) (
)\()) ((_) ( /( ((_) )\ ) ( /( ( ( /( )(
((_)\ _ )(_)) _ (()/( )(_)) )\ )(_)) (()\
| |(_) | | ((_)_ | | )(_)) ((_)_ ((_) ((_)_ ((_)
| '_ \ | | / _` | | | | || | / _` | (_-< / _` | | '_|
|_.__/ |_| \__,_| |_| \_, | \__,_| /__/ \__,_| |_|
|__/
"""
from scipy import special
dir(special)"""
Ne kadar fonksiyon varsa burada listelenir....
Çıkan orneklerden biri
"comb"...
"""
from scipy import special
def drumhead_height(n, k, distance, angle, t):
kth_zero = special.jn_zeros(n, k)[-1]
return np.cos(t) * np.cos(n*angle) * special.jn (n,distance* kth_zero)theta = np.r_[0:2*np.pi:50j]
radius = np.r_[0:1:50j]x = np.array([r * np.cos(theta) for r in radius])
y = np.array([r * np.sin(theta) for r in radius])
z = np.array([drumhead_height(1, 1, r, theta, 0.5) for r in radius])
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
fig = plt.figure()
ax = Axes3D(fig)
ax.plot_surface(x, y, z, rstride=1, cstride=1, cmap=cm.jet)
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')
plt.show()
def binary_entropy(x):
return -(sc.xlogy(x, x) + sc.xlog1py(1 - x, -x))/np.log(2)
def step(x):
return 0.5*(np.sign(x) + np.sign(1 - x))
def ramp(x):
return np.maximum(0, x)