Skip to content

Commit

Permalink
Merge pull request #15 from mfschubert/perf
Browse files Browse the repository at this point in the history
Add comment about performance
  • Loading branch information
mfschubert authored Mar 28, 2024
2 parents 20fafdb + 62e5a1c commit c7b9b4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/imageruler/imageruler.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ def minimum_length_scale(
Returns:
The detected minimum length scales `(length_scale_solid, length_scale_void)`.
"""
# Note that when the minimum of solid and void length scale is desired,
# a faster implementation involving comparison between binary opening and
# closing of designs is possible. This could improve performance by a factor
# of two or greater.
if x.ndim != 2:
raise ValueError(f"`x` must be 2-dimensional, but got shape {x.shape}.")
if not isinstance(x, onp.ndarray):
Expand Down

0 comments on commit c7b9b4b

Please sign in to comment.