![](/img/trans.png)
[英]Distributed calculus in julia with python imported code: UndefVarError: __anon__ not defined
[英]julia UndefVarError: unshift! not defined
我使用 julia 1.4,並運行以下代碼:
using PyCall
using JLD
using ArgParse
using Pandas
@pyimport networkx as nx
@pyimport scipy.sparse.csgraph as csg
@pyimport numpy as np
unshift!(PyVector(pyimport("sys")["path"]), "")
# unshift!(PyVector(pyimport("sys")["path"]), "..")
unshift!(PyVector(pyimport("sys")["path"]), "combinatorial")
@pyimport utils.load_graph as lg
@pyimport utils.distortions as dis
@pyimport graph_util as gu
....
當我運行此代碼時,出現以下錯誤:
ERROR: LoadError: UndefVarError: unshift! not defined
Stacktrace:
[1] top-level scope at /root/hyperbolics/combinatorial/comb.jl:9
[2] include(::Module, ::String) at ./Base.jl:377
[3] exec_options(::Base.JLOptions) at ./client.jl:288
[4] _start() at ./client.jl:484
in expression starting at /root/hyperbolics/combinatorial/comb.jl:9
當我搜索文檔時,取消移動。 在 julia 1,4 中存在 function。 所以我不明白為什么會出現此錯誤,我是 julia 的新手。請幫忙。
不動。 在 julia 1.4 中存在 function
你在哪里看到的? 兩年前改名為Julia 1.0 pushfirst!
:
julia> pushfirst!([1, 2, 3], 4)
4-element Array{Int64,1}:
4
1
2
3
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.