Skip to content
Snippets Groups Projects
Commit d2a768ba authored by s214735's avatar s214735
Browse files

Checked docstrings for minor errors w main focus on example code

parent d009d6bf
No related branches found
No related tags found
No related merge requests found
...@@ -25,8 +25,8 @@ def volume(obj, logs: bool = True, **mesh_kwargs) -> float: ...@@ -25,8 +25,8 @@ def volume(obj, logs: bool = True, **mesh_kwargs) -> float:
mesh = qim3d.io.load_mesh('path/to/mesh.obj') mesh = qim3d.io.load_mesh('path/to/mesh.obj')
# Compute the volume of the mesh # Compute the volume of the mesh
volume = qim3d.features.volume(mesh) vol = qim3d.features.volume(mesh)
print('Volume:', volume) print('Volume:', vol)
``` ```
Compute volume from a np.ndarray: Compute volume from a np.ndarray:
...@@ -34,12 +34,10 @@ def volume(obj, logs: bool = True, **mesh_kwargs) -> float: ...@@ -34,12 +34,10 @@ def volume(obj, logs: bool = True, **mesh_kwargs) -> float:
import qim3d import qim3d
# Generate a 3D blob # Generate a 3D blob
synthetic_blob = qim3d.generate.noise_object(noise_scale = 0.015) vol = qim3d.generate.noise_object(noise_scale = 0.015)
synthetic_blob = qim3d.generate.noise_object(noise_scale = 0.015)
# Compute the volume of the blob # Compute the volume of the blob
volume = qim3d.features.volume(synthetic_blob, level=0.5) volume = qim3d.features.volume(vol, level=0.5)
volume = qim3d.features.volume(synthetic_blob, level=0.5)
print('Volume:', volume) print('Volume:', volume)
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment