New answers tagged

0

needed_values = band2.ReadAsArray() needed_values[np.isnan(needed_values)] = -99 needed_values[((needed_values[:, ] <= start_number) | (needed_values[:, ] >= stop_number))] = -99 band2.WriteArray(needed_values) band2.SetNoDataValue(-99)


Top 50 recent answers are included