Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dtypes are inconsistent throughout rs.utils #61

Open
kmdalton opened this issue May 17, 2021 · 1 comment
Open

dtypes are inconsistent throughout rs.utils #61

kmdalton opened this issue May 17, 2021 · 1 comment

Comments

@kmdalton
Copy link
Member

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.

@JBGreisman
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants