From 85d9ff7ace1779b4eab90d42edb0f173dee0025b Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sun, 31 Oct 2021 19:02:49 -0700 Subject: [PATCH] use dtype when allocating --- gridlock/grid.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gridlock/grid.py b/gridlock/grid.py index d0a1530..e320854 100644 --- a/gridlock/grid.py +++ b/gridlock/grid.py @@ -250,9 +250,9 @@ class Grid: The allocated array """ if fill_value is None: - return numpy.empty(self.cell_data_shape) + return numpy.empty(self.cell_data_shape, dtype=dtype) else: - return numpy.full(self.cell_data_shape, fill_value) + return numpy.full(self.cell_data_shape, fill_value, dtype=dtype) def __init__(self, pixel_edge_coordinates: Sequence[numpy.ndarray],