Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MetricValues copes with differing iteration lengths

  • Loading branch information...
commit 18b54af6aff7a2b546cdc94c9bddbffbdc160c9c 1 parent 741bba8
Matt authored

Showing 1 changed file with 2 additions and 3 deletions. Show diff stats Hide diff stats

  1. +2 3 graphing/metric_values.py
5 graphing/metric_values.py
@@ -4,12 +4,11 @@
4 4
5 5 class MetricValues:
6 6 def __init__(self, transform_dir):
7   - value_list = [genfromtxt(join(transform_dir, file)) for file in listdir(transform_dir)]
8   - self._values = array(value_list)
  7 + self._values = [genfromtxt(join(transform_dir, file)) for file in listdir(transform_dir)]
9 8
10 9 def values(self):
11 10 return self._values
12 11
13 12 def delta_values(self):
14 13 # subtract the previous value from each value
15   - return self._values[:,1:] - self._values[:,:-1]
  14 + return [row[1:] - row[:-1] for row in self._values]

0 comments on commit 18b54af

Please sign in to comment.
Something went wrong with that request. Please try again.