File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -303,17 +303,21 @@ def sort(lambd):
303
303
# construct points for evaluation of resolvent
304
304
points = []
305
305
arg = numpy .linspace (0 , 2 * numpy .pi , n_points , endpoint = False )
306
-
307
306
for midpoint , radius_max in zip (midpoints , radii ):
308
307
radius_log = numpy .logspace (numpy .log10 (eps_min ),
309
308
numpy .log10 (radius_max ),
310
309
n_circles
311
310
)
311
+
312
312
#radius_lin = numpy.linspace(eps_min, radius_max, n_circles)
313
313
for radius in radius_log :
314
314
rand = 0.
315
315
if randomize :
316
316
rand = numpy .random .rand ()
317
- points .append (midpoint + radius * numpy .exp (1j * (rand + arg )))
317
+
318
+ # check that radius is larger than round-off in order to
319
+ # avoid duplicate points
320
+ if numpy .abs (radius )/ numpy .abs (midpoint ) > 1e-15 :
321
+ points .append (midpoint + radius * numpy .exp (1j * (rand + arg )))
318
322
points = numpy .concatenate (points )
319
323
super (NonnormalAuto , self ).__init__ (A , points , ** kwargs )
You can’t perform that action at this time.
0 commit comments