Skip to content

Commit 9e11960

Browse files
tkfjverzani
authored andcommitted
Fix error: 'syntax: malformed "import" statement' in Julia 1.2 (#252)
1 parent ae057d9 commit 9e11960

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/specialfuns.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ julia_sympy_map = (
114114

115115
for (jmeth, smeth) in [(j,s) for (j,s) in julia_sympy_map if s !== :nothing && j!== :nothing]
116116
meth_name = string(smeth)
117-
eval(Expr(:import, :SpecialFunctions, jmeth))
117+
@eval import SpecialFunctions: $jmeth
118118
@eval begin
119119
# @doc """
120120
# `$($meth_name)`: a SymPy function.
@@ -151,7 +151,7 @@ lgamma(x::Sym) = log(gamma(x))
151151
## should dispatch to julia version.
152152
for fn in (:besselj, :bessely, :besseli, :besselk)
153153
meth = string(fn)
154-
eval(Expr(:import, :SpecialFunctions, fn))
154+
@eval import SpecialFunctions: $fn
155155
@eval ($fn)(nu::Number, x::Sym; kwargs...) = SymPy._sympy_meth($meth, nu, x; kwargs...)
156156
@eval ($fn)(nu::Number, a::AbstractArray{Sym}) = map(x ->$fn(nu, x), a)
157157
end

0 commit comments

Comments
 (0)