Example #1
0
 def test_notcube_error(self):
     with pytest.raises(TypeError):
         plan.OpeningAnglePlanform(self.golfcube['eta'][-1, :, :].data)
Example #2
0
    def test_defaults_array_float_error(self):

        with pytest.raises(TypeError):
            _ = plan.OpeningAnglePlanform(self.simple_ocean.astype(float))
Example #3
0
    def test_defaults_cube(self):

        _ = plan.OpeningAnglePlanform(self.golfcube, t=-1)
Example #4
0
    def test_defaults_array_bool(self):

        oap = plan.OpeningAnglePlanform(self.simple_ocean.astype(bool))
        assert isinstance(oap.sea_angles, xr.core.dataarray.DataArray)
        assert oap.sea_angles.shape == self.simple_ocean.shape
        assert oap.below_mask.dtype == bool