Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include pytest.ini
recursive-include tests *.py *.json *.R
10 changes: 5 additions & 5 deletions pyforestscan/calculate.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def calculate_voxel_stat(
dimension: str,
stat: str,
z_index_range: Optional[Tuple[int, Optional[int]]] = None,
):
) -> Tuple[np.ndarray, List[float]]:
"""
Compute a column-wise statistic for a given dimension over a 3-D voxel grid.

Expand All @@ -350,10 +350,10 @@ def calculate_voxel_stat(
the first three voxels (indices 0, 1, 2).

Returns:
tuple[np.ndarray, list]: (stat_array, extent)
- stat_array: 2-D array shaped (nx, ny) with the requested statistic per column.
Cells without points are NaN (except for 'count', which yields 0).
- extent: [x_min, x_max, y_min, y_max] covering the raster footprint.
tuple[np.ndarray, list]: The statistic array and raster extent. The array
has shape (nx, ny), with the requested statistic per column. Cells
without points are NaN, except for 'count', which yields 0. The
extent is [x_min, x_max, y_min, y_max], covering the raster footprint.
"""
if dimension not in arr.dtype.names:
raise KeyError(f"Dimension '{dimension}' not found in array fields")
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="pyforestscan",
version="0.4.1",
version="0.5.0",
author="Joseph Emile Honour Percival",
author_email="ipercival@gmail.com",
description="Analyzing forest structure using aerial LiDAR data",
Expand All @@ -20,7 +20,7 @@
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
packages=setuptools.find_packages(),
packages=setuptools.find_packages(exclude=("tests", "tests.*")),
python_requires=">=3.11",
install_requires=[
'requests>=2.32.4',
Expand All @@ -33,6 +33,7 @@
'numpy>=2.3.1',
'matplotlib>=3.10.3',
'scipy>=1.16.0',
'tqdm>=4.67.1',
],
extras_require={
'dev': [
Expand Down
Loading