You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, we have rather variable typing of NDArray variables.
We’ve have some variables typed as NDArray[[np.int]] and NDArray[np.str_] but then the demography module has been using NDArray[np.float32] and much of the rest of the codebase has bare NDArray.
The np.float32 in the demography wasn't very well thought through. The rationale is simply to reduce memory requirements and (maybe?) run faster, but because it is so piecemeal it likely isn't effective at either due to type promotion etc. We have #304 to think about addressing this more systematically, but for now we should just type NDArray and do so consistently.
The text was updated successfully, but these errors were encountered:
At the moment, we have rather variable typing of
NDArray
variables.We’ve have some variables typed as
NDArray[[np.int]]
andNDArray[np.str_]
but then thedemography
module has been usingNDArray[np.float32]
and much of the rest of the codebase has bareNDArray
.The
np.float32
in thedemography
wasn't very well thought through. The rationale is simply to reduce memory requirements and (maybe?) run faster, but because it is so piecemeal it likely isn't effective at either due to type promotion etc. We have #304 to think about addressing this more systematically, but for now we should just typeNDArray
and do so consistently.The text was updated successfully, but these errors were encountered: