Skip to content

Commit dcd6e2c

Browse files
committed
Using a faster check of whether Polynomial is installed
1 parent 981d320 commit dcd6e2c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/plot.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
pkgs = keys(Pkg.installed())
2-
31
function get_points(f::Function, options=Dict())
42
opt = merge(["left"=>-10, "right"=>10, "step"=>0.5, "name"=>"$f"], options)
53
n::Int = (opt["right"] - opt["left"]) / opt["step"] + 1
@@ -24,7 +22,7 @@ function plot(f::Function, options=Dict())
2422
return plot([f], options)
2523
end
2624

27-
if in("Polynomial", pkgs)
25+
if Pkg.installed("Polynomial") !== nothing
2826
using Polynomial
2927

3028
function plot{T<:Number}(ps::Array{Poly{T},1}, options=Dict())

0 commit comments

Comments
 (0)