remove @profile markers
This commit is contained in:
parent
a7bb9a4fa7
commit
bc86b759d1
5 changed files with 0 additions and 44 deletions
|
|
@ -5,13 +5,6 @@ from numpy.linalg import norm
|
|||
from . import poly_t, plane_t
|
||||
from .util import _get_maps, find_components, find_faces
|
||||
|
||||
try:
|
||||
# Check if running with line_profiler
|
||||
profile
|
||||
except NameError:
|
||||
def profile(f):
|
||||
return f
|
||||
|
||||
|
||||
def planes_from_boundary(vertices: numpy.ndarray,
|
||||
faces: List[numpy.ndarray]
|
||||
|
|
@ -41,7 +34,6 @@ def planes_from_boundary(vertices: numpy.ndarray,
|
|||
return planes
|
||||
|
||||
|
||||
@profile
|
||||
def build_polyhedron(vertices: numpy.ndarray, faces: numpy.ndarray) -> poly_t:
|
||||
'''
|
||||
Generate a 3-verted-connected Schlegel diagram representation
|
||||
|
|
@ -263,7 +255,6 @@ def build_polyhedron(vertices: numpy.ndarray, faces: numpy.ndarray) -> poly_t:
|
|||
return {'vertices': final_vertices, 'neighbors': neighbors}
|
||||
|
||||
|
||||
@profile
|
||||
def boundary_from_poly(poly: poly_t) -> Dict:
|
||||
'''
|
||||
Generate a boundary represeentation corresponding to the provided
|
||||
|
|
|
|||
|
|
@ -4,11 +4,6 @@ import numpy
|
|||
from . import poly_t, plane_t
|
||||
from .util import find_faces
|
||||
|
||||
try:
|
||||
# Check if running with line_profiler
|
||||
profile
|
||||
except NameError:
|
||||
def profile(f):
|
||||
|
||||
def number_of_moments(order: int) -> int:
|
||||
'''
|
||||
|
|
@ -36,7 +31,6 @@ def get_volume(poly: poly_t) -> float:
|
|||
return get_moments(poly, 0)[0]
|
||||
|
||||
|
||||
@profile
|
||||
def get_moments(poly: poly_t, order: int) -> numpy.ndarray:
|
||||
'''
|
||||
Calculates the moments of a polyhedron, up to the specified polynomial order.
|
||||
|
|
|
|||
|
|
@ -3,13 +3,6 @@ import numpy
|
|||
from . import poly_t, plane_t
|
||||
from .util import build_empty, _get_map
|
||||
|
||||
try:
|
||||
# Check if running with line_profiler
|
||||
profile
|
||||
except NameError:
|
||||
def profile(f):
|
||||
return f
|
||||
|
||||
|
||||
def clip(poly: poly_t, plane: plane_t) -> poly_t:
|
||||
'''
|
||||
|
|
@ -29,7 +22,6 @@ def clip(poly: poly_t, plane: plane_t) -> poly_t:
|
|||
return left_poly
|
||||
|
||||
|
||||
@profile
|
||||
def split(poly, plane, same_only: bool = False):
|
||||
'''
|
||||
Clip a polyhedron with a plane.
|
||||
|
|
|
|||
13
adze/util.py
13
adze/util.py
|
|
@ -1,13 +1,6 @@
|
|||
from typing import Dict, Tuple, List
|
||||
import numpy
|
||||
|
||||
try:
|
||||
# Check if running with line_profiler
|
||||
profile
|
||||
except NameError:
|
||||
def profile(f):
|
||||
return f
|
||||
|
||||
|
||||
plane_t = Tuple[numpy.ndarray, float]
|
||||
poly_t = Dict[str, numpy.ndarray]
|
||||
|
|
@ -26,7 +19,6 @@ def build_empty() -> poly_t:
|
|||
}
|
||||
|
||||
|
||||
@profile
|
||||
def find_components(neighbors: numpy.ndarray) -> numpy.ndarray:
|
||||
'''
|
||||
Given an adjacency list, flood-fill to find and label connected components.
|
||||
|
|
@ -57,7 +49,6 @@ def find_components(neighbors: numpy.ndarray) -> numpy.ndarray:
|
|||
return component - 1
|
||||
|
||||
|
||||
@profile
|
||||
def find_faces(neighbors: numpy.ndarray) -> List[numpy.ndarray]:
|
||||
'''
|
||||
Traverse the Schlegel diagram to find chordless cycles
|
||||
|
|
@ -140,7 +131,6 @@ def find_faces(neighbors: numpy.ndarray) -> List[numpy.ndarray]:
|
|||
return cleaned_faces(remove, k)
|
||||
|
||||
|
||||
@profile
|
||||
def _get_map(a, b):
|
||||
'''
|
||||
Returns m such that a[m] == b
|
||||
|
|
@ -155,7 +145,6 @@ def _get_map(a, b):
|
|||
return sa[r]
|
||||
|
||||
|
||||
@profile
|
||||
def _get_map_rows(a, b):
|
||||
'''
|
||||
Row-wise _get_map
|
||||
|
|
@ -166,7 +155,6 @@ def _get_map_rows(a, b):
|
|||
return _get_map(a1d, b1d)
|
||||
|
||||
|
||||
@profile
|
||||
def _get_maps(a, b):
|
||||
'''
|
||||
Returns m, n such that a[m] == b, b[n] == a
|
||||
|
|
@ -184,7 +172,6 @@ def _get_maps(a, b):
|
|||
return m, n
|
||||
|
||||
|
||||
@profile
|
||||
def _get_maps_rows(a, b):
|
||||
'''
|
||||
Row-wise _get_maps
|
||||
|
|
|
|||
|
|
@ -6,15 +6,7 @@ from .split import split, clip
|
|||
from .moments import get_moments, number_of_moments
|
||||
from .shapes import planes_from_box
|
||||
|
||||
try:
|
||||
# Check if running with line_profiler
|
||||
profile
|
||||
except NameError:
|
||||
def profile(f):
|
||||
return f
|
||||
|
||||
|
||||
@profile
|
||||
def voxelize(poly: poly_t,
|
||||
planes: List[numpy.ndarray],
|
||||
include_outside: bool = False,
|
||||
|
|
|
|||
Loading…
Reference in a new issue