reciprocalspaceship icon indicating copy to clipboard operation
reciprocalspaceship copied to clipboard

dtypes are inconsistent throughout rs.utils

Open kmdalton opened this issue 3 years ago • 1 comments

We do not consistently use the same dtypes in functions within rs.utils. We should come up with a unified philosophy for how numpy dtypes 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.

kmdalton avatar May 17 '21 21:05 kmdalton

I agree with your take of prioritizing 32-bit dtypes where possible

JBGreisman avatar May 19 '21 16:05 JBGreisman