def resize(self, block_size, order=<NUM_LIT:0>, mode='<STR_LIT>', cval=False, preserve_range=True):
if not cval:<EOL><INDENT>cval = np.nan<EOL><DEDENT>raster2 = resize(self.raster.data, block_size, order=order, mode=mode,<EOL>cval=cval, preserve_range=preserve_range)<EOL>mask = resize(self.raster.mask, block_size, order=order, mode=mode,<EOL>cval=cval, preserve_range=preserve_range)<EOL>raster2 = np.ma.masked_array(raster2, mask=mask, fill_value=self.raster.fill_value)<EOL>raster2[raster2.mask] = self.nodata_value<EOL>raster2.mask = np.logical_or(np.isnan(raster2.data), raster2.data == self.nodata_value)<EOL>geot = list(self.geot)<EOL>[geot[-<NUM_LIT:1>],geot[<NUM_LIT:1>]] = np.array([geot[-<NUM_LIT:1>], geot[<NUM_LIT:1>]])*self.shape/block_size<EOL>return GeoRaster(raster2, tuple(geot), nodata_value=self.nodata_value,projection=self.projection, datatype=self.datatype)<EOL>
geo.resize(new_shape, order=0, mode='constant', cval=np.nan, preserve_range=True)

Returns resized georaster