Stop using numpy for just a mean

This commit stops using numpy in the 5332fe255095 migration, which is
a bit heavyweight to require for running migrations. Especially when
you can accomplish the same task using python built-ins.

Change-Id: Icbb22f7ffcba7f8b8e5de7ea38472a30a05cc598
This commit is contained in:
Matthew Treinish 2015-01-24 22:39:01 -05:00
parent e489159537
commit 0084375002
2 changed files with 1 additions and 3 deletions

View File

@ -6,4 +6,3 @@ python-subunit>=0.0.18
six>=1.5.2
SQLAlchemy>=0.7.8
pandas
numpy

View File

@ -25,7 +25,6 @@ revision = '5332fe255095'
down_revision = '28ac1ba9c3db'
import numpy as np
from oslo.db.sqlalchemy import utils as db_utils
from subunit2sql.db import api as db_api
@ -51,7 +50,7 @@ def upgrade():
results[test_run[0]] = [delta]
for test in results:
avg = np.mean(results[test])
avg = float(sum(results[test])) / float(len(results[test]))
db_api.update_test({'run_time': avg}, test)