Skip to content
Open
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
@@ -1,4 +1,6 @@
include mcubes/*.py
include mcubes/*.pyi
include mcubes/py.typed
exclude mcubes/numpy_smoothing.py

include mcubes/src/*.h
Expand Down
21 changes: 21 additions & 0 deletions mcubes/_mcubes.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from typing import Callable, Tuple

import numpy as np
from numpy.typing import NDArray


def marching_cubes(
volume: NDArray[np.generic],
isovalue: float,
) -> Tuple[NDArray[np.float64], NDArray[np.uintp]]: ...


def marching_cubes_func(
lower: Tuple[float, float, float],
upper: Tuple[float, float, float],
numx: int,
numy: int,
numz: int,
f: Callable[[float, float, float], float],
isovalue: float,
) -> Tuple[NDArray[np.float64], NDArray[np.uintp]]: ...
Empty file added mcubes/py.typed
Empty file.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def extensions():
"Topic :: Scientific/Engineering :: Image Recognition",
],
packages=["mcubes"],
package_data={"mcubes": ["py.typed", "*.pyi"]},
ext_modules=extensions(),
install_requires=['numpy>=1.21', 'scipy>=1.0.0'],
)