From 2a5686c6fe855502523e495e43bd381d14191c7b Mon Sep 17 00:00:00 2001 From: "Kenneth D. Mankoff" Date: Tue, 19 Jul 2022 12:16:36 -0700 Subject: [PATCH] Make code match comments - use 64bit float --- xarray/coding/variables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xarray/coding/variables.py b/xarray/coding/variables.py index 3e3d8b07e3d..0cde2f53484 100644 --- a/xarray/coding/variables.py +++ b/xarray/coding/variables.py @@ -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