Skip to content

Commit

Permalink
Make code match comments - use 64bit float
Browse files Browse the repository at this point in the history
  • Loading branch information
mankoff committed Jul 19, 2022
1 parent 392a614 commit 2a5686c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xarray/coding/variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def _choose_float_dtype(dtype, has_offset):
# Sensitivity analysis can be tricky, so we just use a float64
# if there's any offset at all - better unoptimised than wrong!
if not has_offset:
return np.float32
return np.float64
# For all other types and circumstances, we just use float64.
# (safe because eg. complex numbers are not supported in NetCDF)
return np.float64
Expand Down

0 comments on commit 2a5686c

Please sign in to comment.