Skip to content

Commit

Permalink
rectify function's comments v3
Browse files Browse the repository at this point in the history
  • Loading branch information
mdupaysign committed Jul 11, 2024
1 parent 8b57015 commit fca39eb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lidro/create_virtual_point/stats/calculate_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import numpy as np


def calculate_quartile_(points: np.array, q: int) -> float:
def calculate_quartile(points: np.array, q: int) -> float:
"""
Calculates the quartile's value of Z coordinates
Expand All @@ -16,7 +16,7 @@ def calculate_quartile_(points: np.array, q: int) -> float:
- float: The quartile of Z coordinates
"""
altitudes = points[:, 2] # Extract the altitude column
n_quartile = round(np.percentile(altitudes, q), 2)
n_quartile = np.round(np.percentile(altitudes, q), 2)

return n_quartile

Expand All @@ -32,6 +32,6 @@ def calculate_median(points: np.array) -> float:
- float: The median of Z coordinates
"""
altitudes = points[:, 2] # Extract the altitude column
n_median = round(np.median(altitudes), 2)
n_median = np.round(np.median(altitudes), 2)

return n_median

0 comments on commit fca39eb

Please sign in to comment.