Open biblicabeebli opened 1 year ago
This issue isn't critical, but it does require a database migration over in beiwe if we ever want to change it.
Could you provide some additional context as to why is the float
output type an issue?
@hackdna this was a question that came from https://github.com/onnela-lab/beiwe-discussions/issues/109
The determination can be "float is fine" but, it does come out the other end of a serializer with an api in float form despite the concept (step count) being an integer. (It is a float in the CSV but the value is always an integer.)
I actually forgot to look at the output file from the proposed fix, I was just iterating trying to work out the numpy/pandas way to do it.
I believe the issue where steps is output as a float is the following line:
I'm not fluent in numpy to really be sure, but I do know that
nan
implies a floating point type (its a float-only concept), and the array is by construction one type.\I tried the following change:
but this emits the runtime warning RuntimeWarning: invalid value encountered in cast
'steps': steps_daily[:, -1].astype(int),
Changing the declaration like this fixes that message
But this officially puts me in "I don't know if this has side effects" territory.
(I'm currently ignoring the separate code path in here for hourly steps, but I assume the same change applies there.)
This is all in
oak.base.run