Skip to content

Commit

Permalink
setting numba parallel False in olio.vector_utilities.points_in_trian…
Browse files Browse the repository at this point in the history
…gles_njit()
  • Loading branch information
andy-beer committed Jan 31, 2024
1 parent 4c2a065 commit e44cff7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions resqpy/olio/vector_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ def points_in_polygons(points: np.ndarray, polygons: np.ndarray, points_xlen: in
return polygons_points


@njit
@njit(parallel = False)
def points_in_triangles_njit(points: np.ndarray, triangles: np.ndarray,
points_xlen: int) -> np.ndarray: # pragma: no cover
"""Calculates which points are within which triangles in 2D.
Expand All @@ -860,7 +860,7 @@ def points_in_triangles_njit(points: np.ndarray, triangles: np.ndarray,
with each row being the triangle number, points y index, and points x index.
"""
triangles_points = np.empty((0, 3), dtype = numba.int32)
for triangle_num in numba.prange(len(triangles)):
for triangle_num in range(len(triangles)):
triangle_points = points_in_triangle(points, triangles[triangle_num], points_xlen, triangle_num)
triangles_points = np.append(triangles_points, triangle_points, axis = 0)

Expand Down

0 comments on commit e44cff7

Please sign in to comment.