def spatial_resolution(self):
        if self.lats.ndim == 1 and self.lons.ndim ==1:
            sorted_lats = numpy.sort(list(set(self.lats)))
            sorted_lons = numpy.sort(list(set(self.lons)))
            lat_resolution = sorted_lats[1] - sorted_lats[0]
            lon_resolution = sorted_lons[1] - sorted_lons[0]
        if self.lats.ndim == 2 and self.lons.ndim ==2:
            lat_resolution = self.lats[1,1] - self.lats[0,0]
            lon_resolution = self.lons[1,1] - self.lons[0,0]

        return (lat_resolution, lon_resolution)
Info -> [Info, Contact, License]
dataset/ETHPy150Open apache/climate/ocw/dataset.py/Dataset.spatial_resolution--crossover with--dataset/ETHPy150Open mission-liao/pyswagger/pyswagger/tests/v1_2/test_upgrade.py/Swagger_Upgrade_TestCase.test_info