Skip to content

Commit

Permalink
Merge pull request #30 from noaa-ocs-modeling/hotfix/1.0.3
Browse files Browse the repository at this point in the history
Fix errors missed in last merge!
  • Loading branch information
SorooshMani-NOAA authored Oct 14, 2022
2 parents 6fcdd18 + d7f2ad8 commit 4ccda20
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ocsmesh/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,7 @@ def remove_holes(
if isinstance(poly, MultiPolygon):
return unary_union([remove_holes(p) for p in poly.geoms])

elif not isinstance(poly, Polygon):
if not isinstance(poly, Polygon):
raise ValueError(
"The input must be either a `Polygon` or `MultiPolygon`:"
+ f"\tType: {type(poly)}"
Expand Down Expand Up @@ -1829,23 +1829,23 @@ def remove_holes_by_relative_size(
--------
remove_holes :
Remove all the whole from the input shape
Notes
-----
For a `Polygon` with no holes, this function returns the original
object. For `MultiPolygon` with no holes, the return value is a
`unary_union` of all the underlying `Polygon`s.
If `rel_size=1` is specified the result is the same as
`remove_holes` function, except for the additional cost of
If `rel_size=1` is specified the result is the same as
`remove_holes` function, except for the additional cost of
calculating the areas.
'''

if isinstance(poly, MultiPolygon):
return unary_union([
remove_holes_by_relative_size(p, rel_size) for p in poly.geoms])

elif not isinstance(poly, Polygon):
if not isinstance(poly, Polygon):
raise ValueError(
"The input must be either a `Polygon` or `MultiPolygon`:"
+ f"\tType: {type(poly)}"
Expand All @@ -1859,7 +1859,7 @@ def remove_holes_by_relative_size(
return Polygon(poly.exterior, new_interiors)

return poly


def get_element_size_courant(
characteristic_velocity_magnitude: Union[float, npt.NDArray[float]],
Expand Down Expand Up @@ -1988,7 +1988,7 @@ def approximate_courant_number_for_depth(
timestep : float
Timestep size (:math:`seconds`) to
element_size : float or array of floats
Element size(s) to use for Courant number calculation. Must
Element size(s) to use for Courant number calculation. Must
be scalar otherwise match the dimension of depth
wave_amplitude : float, default=2
Free surface elevation (:math:`meters`) from the reference (i.e. wave height)
Expand Down

0 comments on commit 4ccda20

Please sign in to comment.