Skip to content
Snippets Groups Projects
Commit 97370b92 authored by Simon Grasse's avatar Simon Grasse
Browse files

fix: initialisation of empty grids

parent da3ec6cf
Branches
Tags
1 merge request!11Creation of first beta release version
...@@ -144,6 +144,7 @@ class RegularGrid(GridDefinition): ...@@ -144,6 +144,7 @@ class RegularGrid(GridDefinition):
def create_gridded_statistics(self, time, grouped_timeseries): def create_gridded_statistics(self, time, grouped_timeseries):
values = np.empty((self.lat.size, self.lon.size, time.size)) values = np.empty((self.lat.size, self.lon.size, time.size))
values[...] = self.fill_value
index = self._as_xy_index[grouped_timeseries.index] index = self._as_xy_index[grouped_timeseries.index]
values[index.T[0], index.T[1]] = grouped_timeseries.values.reshape( values[index.T[0], index.T[1]] = grouped_timeseries.values.reshape(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment