Closed kennethshsu closed 1 year ago
@jbogaardt can you help resolve some of the unit tests regarding installation?
Also, I don't think my solution will work, it will break when the valuations are less granular than annual. Looking deeper.
it looks like pandas no longer supports TimeDelta of Month as it is ambiguous. It can be anywhere between 28 and 31 days.
Numpy treats a month as 30 days regardless, and this is causing conversion from days to months to fail:
imprt numpy as np
np.timedelta64(1, 'M').astype('timedelta64[D]')
I've played with using (365/12) as the monthly value and it seems to restore the correct ages.
Right, I think the only way to get around it is to actually calculate the development age using year and month manually. Using anything from pandas
or numpy
will force the calculation to be too accurate, and we'll then need to be forced to round and result in possible error.
Addressing #438