We do not consistently use the same dtypes in functions within rs.utils. We should come up with a unified philosophy for how numpydtypes are determined for returned values. I can think of at least three defensible possibilities:
Use input dtypes to decide return dtypes
Add a dtype=np.{float32, int32, ...} parameter to each function
Always return np.float32 or np.int32 as applicable.
I lean toward the last option, because it meshes best with the mtz standard, and I think it will lead to fewer edge cases and gotchas.
We do not consistently use the same
dtypes
in functions withinrs.utils
. We should come up with a unified philosophy for hownumpy
dtypes
are determined for returned values. I can think of at least three defensible possibilities:dtype=np.{float32, int32, ...}
parameter to each functionAlways return
np.float32
ornp.int32
as applicable.I lean toward the last option, because it meshes best with the mtz standard, and I think it will lead to fewer edge cases and gotchas.