In [23]:
from IPython.display import YouTubeVideo
from IPython.display import VimeoVideo
VimeoVideo("53052481",height= 500, width=800)
Out[23]:
In [15]:
def func(n):
d = 0.0
for i in range(n):
d += (i%3 -1)*i
return d
In [16]:
%timeit func(10000)
In [17]:
%%file dunc_fortran.f
subroutine func_fort(n,d)
integer, intent(in) :: n
double precision, intent(out) :: d
integer :: i
d = 0
do i=0, n-1
d = d + (mod(i,3) - 1) * i
end do
end subroutine func_fort
In [21]:
!f2py -c dunc_fortran.f -m dunc_fortran > C:\Users\Peyman.n\Downloads
In [30]:
import qgis
In [31]:
import numpy
In [32]:
import numba
In [33]:
import scipy
In [34]:
from osgeo import gdal
In [35]:
import numpy as np
In [37]:
np.zeros((3,4))
Out[37]:
In [39]:
np.c*?
In [41]:
a =np.eye(3)
In [42]:
a.strides
Out[42]:
In [43]:
a
Out[43]:
In [44]:
a.dtype
Out[44]:
In [49]:
a.mean(), a.max(), a.reshape((1,9))
Out[49]:
In [64]:
x = np.random.normal(0,1,size = 8)
In [66]:
import matplotlib.pyplot as plt
plt.hist(x)
Out[66]:
In [67]:
plt.hist(x)
Out[67]:
In [61]:
import skimage
In [68]:
x[2]
Out[68]:
In [70]:
x = np.linspace(-1, 1 , 512)
In [72]:
p = np.polynomial.Polynomial([3, -3,2, 5])
In [73]:
plt.plot(p(x))
Out[73]:
In [ ]: