Explain the "why" in a few more comments
Comments that only repeated the code are removed.
This commit is contained in:
parent
51f68743e5
commit
f90f263dab
3 changed files with 8 additions and 10 deletions
|
|
@ -123,7 +123,6 @@ class Grid(meta.Base):
|
|||
|
||||
pixel = pixels[(n_x, n_y)]
|
||||
|
||||
# Create an association between the `address` and `pixel`
|
||||
assoc = db.AddressPixelAssociation(address=address, pixel=pixel)
|
||||
pixel.addresses.append(assoc)
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@ class ForecastingModelABC(abc.ABC):
|
|||
# vertical ones all time steps of the day
|
||||
predictions = self.predict(pixel, predict_at, train_horizon)
|
||||
|
||||
# Convert the `predictions` into a `list` of `Forecast` objects
|
||||
forecasts = db.Forecast.from_dataframe(
|
||||
pixel=pixel,
|
||||
time_step=self._order_history.time_step,
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ class OrderHistory:
|
|||
msg = "no orders in the pixel"
|
||||
raise RuntimeError(msg)
|
||||
|
||||
# Return a proper `datetime.datetime` object
|
||||
# A plain `dt.datetime` instead of a `pd.Timestamp`
|
||||
return dt.datetime(
|
||||
first_order.year,
|
||||
first_order.month,
|
||||
|
|
@ -240,7 +240,7 @@ class OrderHistory:
|
|||
msg = "no orders in the pixel"
|
||||
raise RuntimeError(msg)
|
||||
|
||||
# Return a proper `datetime.datetime` object
|
||||
# A plain `dt.datetime` instead of a `pd.Timestamp`
|
||||
return dt.datetime(
|
||||
last_order.year,
|
||||
last_order.month,
|
||||
|
|
|
|||
Loading…
Reference in a new issue