¡@

Home 

python Programming Glossary: dat

pylab.ion() in python 2, matplotlib 1.1.1 and updating of the plot while the program runs

http://stackoverflow.com/questions/12822762/pylab-ion-in-python-2-matplotlib-1-1-1-and-updating-of-the-plot-while-the-pro

in python 2 matplotlib 1.1.1 and updating of the plot while the program runs what I am trying to do.. time.sleep consider import pylab import time import random dat 0 1 pylab.plot dat pylab.ion pylab.draw for i in range 18 dat.append.. import pylab import time import random dat 0 1 pylab.plot dat pylab.ion pylab.draw for i in range 18 dat.append random.uniform..

NumPy: calculate averages with NaNs removed

http://stackoverflow.com/questions/5480694/numpy-calculate-averages-with-nans-removed

TRUE . Here is my non working example import numpy as np dat np.array 1 2 3 4 5 np.nan np.nan 6 np.nan np.nan np.nan np.nan.. 2 3 4 5 np.nan np.nan 6 np.nan np.nan np.nan np.nan print dat print dat.mean 1 With NaNs removed my expected output would.. np.nan 6 np.nan np.nan np.nan np.nan print dat print dat.mean 1 With NaNs removed my expected output would be array 2...