# Vecnorm Error

**URL:** <https://discourse.julialang.org/t/vecnorm-error/35648>\
**Category:** New to Julia\
**Created:** [March 6, 2020, 4:19pm UTC](https://discourse.julialang.org/t/vecnorm-error/35648 "2020-03-06T16:19:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JP\_Nieto](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jp_nieto/32/10082_2.png) [@JP\_Nieto](https://discourse.julialang.org/u/JP_Nieto)\
**Post date:** [March 6, 2020, 4:19pm UTC](https://discourse.julialang.org/t/vecnorm-error/35648/1 "2020-03-06T16:19:56Z")

</div>

I have this code that must be from an old version

function column\_norms(X, i)  
M = size(X)[2]  
X\_diff = X .- X[:, i]  
norm\_vector = [vecnorm(X\_diff[:, k]) for k=1:M]  
norm\_vector[i] = 10^10  
return(norm\_vector)

ERROR:  
UndefVarError: vecnorm not defined

Stacktrace:  
[1] (::var"#9#10"{Array{Float64,2}})(::Int64) at .\none:0  
[2] collect(::Base.Generator{UnitRange{Int64},var"#9#10"{Array{Float64,2}}}) at .\generator.jl:47  
[3] column\_norms(::Array{Float64,2}, ::Int64) at .\In[21]:65  
[4] compute\_norms(::Array{Float64,2}) at .\In[21]:56  
[5] lyaponuv\_k(::Array{Float64,1}, ::Int64, ::Int64, ::Int64) at .\In[21]:3  
[6] lyaponuv(::Array{Float64,1}, ::Int64, ::Int64, ::Int64) at .\In[21]:81  
[7] top-level scope at .\In[24]:31

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [March 6, 2020, 4:26pm UTC](https://discourse.julialang.org/t/vecnorm-error/35648/2 "2020-03-06T16:26:14Z")

</div>

Check the [0.7 manual](https://docs.julialang.org/en/v0.7/NEWS/#Deprecated-or-removed-1):

> - `vecdot` and `vecnorm` are deprecated in favor of `dot` and `norm` , respectively ([#27401](https://github.com/JuliaLang/julia/issues/27401)).

In general if you’ve got pre-Julia 1.0 code it might be useful to run it in Julia 0.7, which is essentially 1.0 with deprecation warnings so it’ll let you know what syntax has changed.
