def resize_old(self, block_size, order=<NUM_LIT:0>, mode='<STR_LIT>', cval=False):
if not cval:<EOL><INDENT>cval = np.nan<EOL><DEDENT>if (self.raster.dtype.name.find('<STR_LIT:float>') != -<NUM_LIT:1> and<EOL>np.max(np.abs([self.max(), self.min()])) > <NUM_LIT:1>):<EOL><INDENT>raster2 = (self.raster-self.min())/(self.max()-self.min())<EOL><DEDENT>else:<EOL><INDENT>raster2 = self.raster.copy()<EOL><DEDENT>raster2 = raster2.astype(float)<EOL>raster2[self.raster.mask] = np.nan<EOL>raster2 = resize(raster2, block_size, order=order, mode=mode, cval=cval)<EOL>raster2 = np.ma.masked_array(raster2, mask=np.isnan(raster2),<EOL>fill_value=self.raster.fill_value)<EOL>raster2 = raster2*(self.max()-self.min())+self.min()<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