Commit 0daf0dc87b833caa53a412d2935a9aac382d54c0
1 parent
c890bcbc
Exists in
master
Review.
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
flaskr/laws/travel_emission_lerp_fit.py
1 | import numpy as np | 1 | import numpy as np |
2 | from .travel_emission_linear_fit import EmissionModel as BaseEmissionModel | 2 | from .travel_emission_linear_fit import EmissionModel as BaseEmissionModel |
3 | -from flaskr.content import Struct | ||
4 | 3 | ||
5 | 4 | ||
6 | class EmissionModel(BaseEmissionModel): | 5 | class EmissionModel(BaseEmissionModel): |
@@ -14,6 +13,8 @@ class EmissionModel(BaseEmissionModel): | @@ -14,6 +13,8 @@ class EmissionModel(BaseEmissionModel): | ||
14 | 13 | ||
15 | sample_points = sorted(config.points, key=lambda p: float(p[0])) | 14 | sample_points = sorted(config.points, key=lambda p: float(p[0])) |
16 | 15 | ||
16 | + # Numpy! | ||
17 | + | ||
17 | previous_point = [0, 0] | 18 | previous_point = [0, 0] |
18 | for i, sample_point in enumerate(sample_points): | 19 | for i, sample_point in enumerate(sample_points): |
19 | if distance <= sample_point[0]: | 20 | if distance <= sample_point[0]: |