this
>>> testdata[testdata[:,0]==today][:,2].mean()
4.267
>>> testdata[testdata[:,0]==yesterday][:,2].mean()
5.634
>>> testdata[testdata[:,0]==twodaysago][:,2].mean()
2.9336
On 10/09/2013 06:46 AM, Roelf Schreurs wrote:
Hi
I have the
Hi
I have the following array and want to calculate the average per day.
Import numpy as np
from datetime import date
today = date(today.year, today.month, 9)
yesterday = date(today.year, today.month, 8)
twodaysago = date(today.year, today.month, 7)
testdata = np.array([[today, "r", 3.2],[toda