Skip to content

Commit

Permalink
Correct indent typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Chahan Kropf committed Nov 22, 2023
1 parent 6c3d1ac commit 8b15107
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
12 changes: 0 additions & 12 deletions climada/hazard/centroids/test/test_vec_ras.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,18 +412,6 @@ def test_area_pass(self):
self.assertTrue(
np.allclose(centr_ras.area_pixel,
np.ones(60 * 50) * 0.009000000000000341 * 0.009000000000000341))
'''
def test_area_approx(self):
"""Test set_area_approx"""
centr_ras = Centroids.from_raster_file(HAZ_DEMO_FL, window=Window(0, 0, 50, 60))
centr_ras.set_area_approx()
approx_dim = (centr_ras.meta['transform'][0] * 111 * 1000
* centr_ras.meta['transform'][0] * 111 * 1000)
self.assertEqual(centr_ras.area_pixel.size, centr_ras.size)
self.assertEqual(np.unique(centr_ras.area_pixel).size, 60)
self.assertTrue(np.array_equal((approx_dim / np.unique(centr_ras.area_pixel)).astype(int),
np.ones(60)))
'''

def test_size_pass(self):
"""Test size property"""
Expand Down
7 changes: 3 additions & 4 deletions climada/hazard/test/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,11 +825,10 @@ def test_concat_pass(self):
frequency_unit='1/week',
fraction=sparse.csr_matrix([[0.02, 0.03, 0.04]]),
intensity=sparse.csr_matrix([[0.2, 0.3, 0.4]]),
units='m/s',)
units='m/s')

haz_2 = Hazard("TC",
latitude=np.array([1, 3, 5]), longitude=np.array([2, 4, 6])),
centroids=Centroids(
centroids=Centroids(latitude=np.array([1, 3, 5]), longitude=np.array([2, 4, 6])),
event_id=np.array([1]),
event_name=['ev2'],
date=np.array([2]),
Expand All @@ -838,7 +837,7 @@ def test_concat_pass(self):
frequency_unit='1/week',
fraction=sparse.csr_matrix([[1.02, 1.03, 1.04]]),
intensity=sparse.csr_matrix([[1.2, 1.3, 1.4]]),
units='m/s',)
units='m/s')

haz = Hazard.concat([haz_1, haz_2])

Expand Down

0 comments on commit 8b15107

Please sign in to comment.