433
433
434
434
for OP in (:< ,:(Base. isless),:(<= ))
435
435
@eval begin
436
- $ OP (a:: Fun{<:ConstantSpace} ,b:: Fun{<:ConstantSpace} ) = $ OP (strictconvert (Number,a),Number (b))
436
+ $ OP (a:: Fun{<:ConstantSpace} ,b:: Fun{<:ConstantSpace} ) =
437
+ $ OP (strictconvert (Number,a), strictconvert (Number, b))
437
438
$ OP (a:: Fun{<:ConstantSpace} ,b:: Number ) = $ OP (strictconvert (Number,a),b)
438
439
$ OP (a:: Number ,b:: Fun{<:ConstantSpace} ) = $ OP (a,strictconvert (Number,b))
439
440
end
@@ -479,8 +480,8 @@ for op in (:(argmax),:(argmin))
479
480
pts = extremal_args (f)
480
481
# the extra real avoids issues with complex round-off
481
482
v = map (real∘ f, pts):: Vector
482
- x = pts[strictconvert (Int, $ op (v)):: Int ]
483
- strictconvert (T, x):: T
483
+ x = pts[strictconvert (Int, $ op (v))]
484
+ strictconvert (T, x)
484
485
end
485
486
486
487
function $op (f:: Fun )
@@ -493,7 +494,7 @@ for op in (:(argmax),:(argmin))
493
494
fp = map (f, pts)
494
495
@assert norm (imag (fp))< 100 eps ()
495
496
v = real (fp):: Vector
496
- x = pts[strictconvert (Int, $ op (v)):: Int ]
497
+ x = pts[strictconvert (Int, $ op (v))]
497
498
strictconvert (T, x)
498
499
end
499
500
end
0 commit comments