title: Julia - absolute value of an array
body: <p>I want to get the absolute value of the following array: </p>
  
  <pre><code>x = [1.1 -22.3 3.01, -1]
  </code></pre>
  
  <p>i.e.: I want an output of the type: <code>x2 = [1.1 22.3 3.01 1]</code>
  However when I type:</p>
  
  <pre><code>abs(x)
  </code></pre>
  
  <p>I get an error: </p>
  
  <pre><code>ERROR: MethodError: no method matching abs(::Array{Float64,2})
  Closest candidates are:
    abs(::Pkg.Resolve.MaxSum.FieldValues.FieldValue) at /Users/vagrant/worker/juliapro-release-osx1011-0_6/build/tmp_julia/Julia-1.0.app/Contents/Resources/julia/share/julia/stdlib/v1.0/Pkg/src/resolve/FieldValues.jl:67
    abs(::Pkg.Resolve.VersionWeights.VersionWeight) at /Users/vagrant/worker/juliapro-release-osx1011-0_6/build/tmp_julia/Julia-1.0.app/Contents/Resources/julia/share/julia/stdlib/v1.0/Pkg/src/resolve/VersionWeights.jl:40
    abs(::Missing) at missing.jl:79
    ...
  Stacktrace:
   [1] top-level scope at none:0
  </code></pre>