Make epsilon float32 by default

This commit is contained in:
Jan Petykiewicz 2021-10-24 19:53:15 -07:00
parent fcd02d3dcf
commit 078bec08d3

View File

@ -237,14 +237,14 @@ class Grid:
raise GridError('Autoshifting requires exactly 3 grids') raise GridError('Autoshifting requires exactly 3 grids')
return [self.shifted_dxyz(which_shifts=a)[a] for a in range(3)] 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. Allocate an ndarray for storing grid data.
Args: Args:
fill_value: Value to initialize the grid to. If None, an fill_value: Value to initialize the grid to. If None, an
uninitialized array is returned. 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: Returns:
The allocated array The allocated array