The unit M in timedelta is unsupported in newer versions of Pandas. There is one such usage in Lifestyle. This should be replaced by, e.g., 28 days or 4 weeks or something else.
@mnjowe Do you have any preference?
|
# get months since last poll |
|
now = self.module.sim.date |
|
months_since_last_poll = round((now - self.date_last_run) / np.timedelta64(1, "M")) |
|
# loop through linear models dictionary and initialise each property in the population dataframe |
|
for _property_name, _model in self._models.items(): |
|
if _model['update'] is not None: |
|
df.loc[df.is_alive, _property_name] = _model['update'].predict( |
|
df.loc[df.is_alive], rng=self.rng, other=self.module.sim.date, |
|
months_since_last_poll=months_since_last_poll) |
The unit
Mintimedeltais unsupported in newer versions of Pandas. There is one such usage in Lifestyle. This should be replaced by, e.g., 28 days or 4 weeks or something else.@mnjowe Do you have any preference?
TLOmodel/src/tlo/methods/enhanced_lifestyle.py
Lines 660 to 668 in 283dc65