python Programming Glossary: randn
Is there any numpy autocorrellation function with standardized output? http://stackoverflow.com/questions/12269834/is-there-any-numpy-autocorrellation-function-with-standardized-output line as ipython pylab as expected In 1 n 1000 In 2 x randn n In 3 xc correlate x x mode 'full' In 4 xc xc xc.argmax In..
Understanding pandas dataframe indexing http://stackoverflow.com/questions/14192741/understanding-pandas-dataframe-indexing In 1 import pandas as pd In 2 from numpy.random import randn In 4 df pd.DataFrame randn 6 3 columns list 'ABC' In 5 df Out.. In 2 from numpy.random import randn In 4 df pd.DataFrame randn 6 3 columns list 'ABC' In 5 df Out 5 A B C 0 1.438161 0.210454..
Prepend a level to a pandas MultiIndex http://stackoverflow.com/questions/14744068/prepend-a-level-to-a-pandas-multiindex numpy as np import pandas as p from numpy.random import randn df p.DataFrame 'A' 'a1' 'a1' 'a2' 'a3' 'B' 'b1' 'b2' 'b3' 'b4'.. 'A' 'a1' 'a1' 'a2' 'a3' 'B' 'b1' 'b2' 'b3' 'b4' 'Vals' randn 4 .groupby 'A' 'B' .sum df Output Vals Output A B Output a1..
Numpy running at half the speed of MATLAB http://stackoverflow.com/questions/16178471/numpy-running-at-half-the-speed-of-matlab time In 11 sysinfo.get_info 'atlas' Out 11 timeit eig randn 1E2 1E2 100 loops best of 3 13.4 ms per loop The same code in.. loop The same code in Matlab runs twice as fast tic eig randn 1E2 toc 1000 6.5650 I install the non optimised ATAS deb from.. ' usr lib atlas base' And the test code In 4 timeit eig randn 1E2 1E2 100 loops best of 3 16.8 ms per loop So no faster. If..
HDF5 and SQLite. Concurrency, compression & I/O performance [closed] http://stackoverflow.com/questions/16628329/hdf5-and-sqlite-concurrency-compression-i-o-performance here's the code import sqlite import os In 3 df DataFrame randn 1000000 2 columns list 'AB' class 'pandas.core.frame.DataFrame'..
Matplotlib animation either freezes after a few frames or just doesn't work http://stackoverflow.com/questions/3441874/matplotlib-animation-either-freezes-after-a-few-frames-or-just-doesnt-work line plot z ylim 3 3 for i in range 60 print 'frame ' i d randn 10 line.set_ydata d draw time.sleep 10e 3 This simpler version.. from pylab import ion hold False for i in range 40 plot randn 10 draw show Thanks EDIT These people seem to be having the..
Python Uniform Spherical Distribution http://stackoverflow.com/questions/5408276/python-uniform-spherical-distribution with radius r and center at the origin. The function 'randn' is initially used to generate m sets of n random variables.. a uniform spatial distribution. Roger Stafford 12 23 05 X randn m n s2 sum X.^2 2 X X. repmat r gammainc s2 2 n 2 .^ 1 n . sqrt..
Relationship between scipy and numpy http://stackoverflow.com/questions/6200910/relationship-between-scipy-and-numpy oldnumeric from numpy import from numpy.random import rand randn from numpy.fft import fft ifft from numpy.lib.scimath import..
Python Multiple Linear Regression using OLS code with specific data? http://stackoverflow.com/questions/7458391/python-multiple-linear-regression-using-ols-code-with-specific-data log pi sqrt square diagonal from numpy.random import randn seed import time class ols Author Vincent Nijs Email v nijs..
|