Exemplo n.º 1
0
 def test_1d_precision(self):
     '''Test 1d with precision keyword'''
     new_clons = np.concatenate((self.lons, np.array([360. + 1e-3])))
     assert has_cyclic(new_clons, precision=1e-2)
     assert not has_cyclic(new_clons, precision=2e-4)
Exemplo n.º 2
0
 def test_3d_axis_cyclic(self):
     '''Test 3d with axis and cyclic keywords'''
     new_clons = np.deg2rad(self.c_lon3d)
     new_lons = np.deg2rad(self.lon3d)
     assert has_cyclic(new_clons, axis=1, cyclic=np.deg2rad(360.))
     assert not has_cyclic(new_lons, axis=1, cyclic=np.deg2rad(360.))
Exemplo n.º 3
0
 def test_data_axis(self, lon, clon, axis):
     '''Test lon is not cyclic, clon is cyclic, with axis keyword'''
     assert not has_cyclic(lon, axis=axis)
     assert has_cyclic(clon, axis=axis)
Exemplo n.º 4
0
 def test_3d_axis(self):
     '''Test 3d with axis keyword, no keyword name for axis'''
     assert has_cyclic(self.c_lon3d, 1)
     assert not has_cyclic(self.lon3d, 1)
Exemplo n.º 5
0
 def test_data(self, lon, clon):
     '''Test lon is not cyclic, clon is cyclic'''
     assert not has_cyclic(lon)
     assert has_cyclic(clon)