got rid of magic number
This commit is contained in:
parent
50cc783b97
commit
bf6e1002a9
@ -12,6 +12,8 @@ import interp.grid.simplex
|
|||||||
import logging
|
import logging
|
||||||
log = logging.getLogger("interp")
|
log = logging.getLogger("interp")
|
||||||
|
|
||||||
|
MAX_SEARCH_COUNT = 128
|
||||||
|
|
||||||
class grid(object):
|
class grid(object):
|
||||||
def __init__(self, verts = None, q = None):
|
def __init__(self, verts = None, q = None):
|
||||||
"""
|
"""
|
||||||
@ -55,7 +57,7 @@ class grid(object):
|
|||||||
while not simplex and cells_to_check:
|
while not simplex and cells_to_check:
|
||||||
attempts += 1
|
attempts += 1
|
||||||
|
|
||||||
if attempts > 200:
|
if attempts > MAX_SEARCH_COUNT:
|
||||||
raise Exception("Is the search becoming exhaustive?")
|
raise Exception("Is the search becoming exhaustive?")
|
||||||
|
|
||||||
cur_cell = cells_to_check.pop(0)
|
cur_cell = cells_to_check.pop(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user