We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e92fe3f + 9f01198 commit c91dd58Copy full SHA for c91dd58
examples/circle_packing/evaluator.py
@@ -36,6 +36,15 @@ def validate_packing(centers, radii):
36
"""
37
n = centers.shape[0]
38
39
+ # Check if radii are nonnegative and not nan
40
+ for i in range(n):
41
+ if(radii[i] < 0):
42
+ print(f"Circle {i} has negative radius {radii[i]}")
43
+ return False
44
+ elif(np.isnan(radii[i])):
45
+ print(f"Circle {i} has nan radius")
46
47
+
48
# Check if circles are inside the unit square
49
for i in range(n):
50
x, y = centers[i]
0 commit comments