python Programming Glossary: np.outer
ode integration in python versus mathematica results http://stackoverflow.com/questions/16222302/ode-integration-in-python-versus-mathematica-results 0 2 np.pi 100 theta np.linspace 0 np.pi 100 xm 2000 np.outer np.cos phi np.sin theta xl4 ym 2000 np.outer np.sin phi np.sin.. 100 xm 2000 np.outer np.cos phi np.sin theta xl4 ym 2000 np.outer np.sin phi np.sin theta yl4 zm 2000 np.outer np.ones np.size.. xl4 ym 2000 np.outer np.sin phi np.sin theta yl4 zm 2000 np.outer np.ones np.size phi np.cos theta ax.plot_surface xm ym zm color..
Why is numpy's einsum faster than numpy's built in functions? http://stackoverflow.com/questions/18365073/why-is-numpys-einsum-faster-than-numpys-built-in-functions 1 loops best of 3 694 ms per loop Outer product np.all np.outer arr_1D arr_1D np.einsum 'i k ik' arr_1D arr_1D True timeit np.outer.. arr_1D arr_1D np.einsum 'i k ik' arr_1D arr_1D True timeit np.outer arr_1D arr_1D 1000 loops best of 3 411 us per loop timeit np.einsum.. Einsum seems to be at least twice as fast for np.inner np.outer np.kron and np.sum regardless of axes selection. The primary..
Running matplotlib in tkinter http://stackoverflow.com/questions/3845407/running-matplotlib-in-tkinter u np.linspace 0 2 np.pi 100 v np.linspace 0 np.pi 100 x 10 np.outer np.cos u np.sin v y 10 np.outer np.sin u np.sin v z 10 np.outer.. 0 np.pi 100 x 10 np.outer np.cos u np.sin v y 10 np.outer np.sin u np.sin v z 10 np.outer np.ones np.size u np.cos v ax.plot_surface.. np.cos u np.sin v y 10 np.outer np.sin u np.sin v z 10 np.outer np.ones np.size u np.cos v ax.plot_surface x y z rstride 4 cstride..
Fast tensor rotation with NumPy http://stackoverflow.com/questions/4962606/fast-tensor-rotation-with-numpy compute the outer product of the g tensors def rotT T g gg np.outer g g gggg np.outer gg gg .reshape 4 g.shape axes 0 2 4 6 0 1.. product of the g tensors def rotT T g gg np.outer g g gggg np.outer gg gg .reshape 4 g.shape axes 0 2 4 6 0 1 2 3 return np.tensordot..
|