From 078bec08d37b6c3226a88741414337f08dfffa4b Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sun, 24 Oct 2021 19:53:15 -0700 Subject: [PATCH] Make epsilon float32 by default --- gridlock/grid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gridlock/grid.py b/gridlock/grid.py index 0a77ba1..eda2410 100644 --- a/gridlock/grid.py +++ b/gridlock/grid.py @@ -237,14 +237,14 @@ class Grid: raise GridError('Autoshifting requires exactly 3 grids') return [self.shifted_dxyz(which_shifts=a)[a] for a in range(3)] - def allocate(self, fill_value: Optional[float] = 1.0, dtype=numpy.float64) -> numpy.ndarray: + def allocate(self, fill_value: Optional[float] = 1.0, dtype=numpy.float32) -> numpy.ndarray: """ Allocate an ndarray for storing grid data. Args: fill_value: Value to initialize the grid to. If None, an uninitialized array is returned. - dtype: Numpy dtype for the array. Default is `numpy.float64`. + dtype: Numpy dtype for the array. Default is `numpy.float32`. Returns: The allocated array