Skip to content

Commit

Permalink
update docstrings + minor corrections + changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Golnesa committed Feb 8, 2024
1 parent 572616b commit bf063ea
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_version():

install_requires = [
"numpy>=1.15,<1.25.0",
"threedi-schema==0.218.*",
"threedi-schema==0.219.1*",
"shapely>=2",
"pyproj>=3",
"condenser[geo]>=0.1.1",
Expand Down
10 changes: 5 additions & 5 deletions threedigrid_builder/grid/cross_section_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def tabulate_builtin(shape, width, height):
height (str): ignored
Returns:
tuple: shape, width_1d (float), None, None
tuple: shape, width_1d (float), None, None, None
"""
try:
width = float(width)
Expand All @@ -151,7 +151,7 @@ def tabulate_egg(shape, width, height):
Returns:
tuple: TABULATED_TRAPEZIUM, width_1d (float),
height_1d (float), table (ndarray of shape (M, 2))
height_1d (float), table (ndarray of shape (M, 2)), None
"""
NUM_INCREMENTS = 16

Expand Down Expand Up @@ -200,7 +200,7 @@ def tabulate_closed_rectangle(shape, width, height):
Returns:
tuple: TABULATED_RECTANGLE, width_1d (float),
height (float), table (ndarray of shape (M, 2))
height (float), table (ndarray of shape (M, 2)), None
"""
try:
width = float(width)
Expand Down Expand Up @@ -246,7 +246,7 @@ def tabulate_tabulated(shape, width, height):
Returns:
tuple: shape, width_1d (float),
height_1d (float), table (ndarray of shape (M, 2))
height_1d (float), table (ndarray of shape (M, 2)), None
"""
widths, heights = _parse_tabulated(width, height)
if len(heights) > 1 and np.any(np.diff(heights) < 0.0):
Expand All @@ -272,7 +272,6 @@ def tabulate_yz(shape, width, height):
"""
ys, zs = _parse_tabulated(width, height)
is_closed = ys[0] == ys[-1] and zs[0] == zs[-1]
shape_return = CrossSectionShape.TABULATED_TRAPEZIUM
if is_closed and len(zs) < 4:
raise SchematisationError(
f"Cross section definitions of closed profiles must have at least "
Expand Down Expand Up @@ -303,6 +302,7 @@ def tabulate_yz(shape, width, height):
ys = ys[:-1]
zs = zs[:-1]
yz = None
shape_return = CrossSectionShape.TABULATED_TRAPEZIUM
else:
yz = np.zeros((len(ys), 4), dtype=float)
yz[:, 0] = ys
Expand Down

This file was deleted.

0 comments on commit bf063ea

Please sign in to comment.