Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shouldn't real([1,2,3]) and imag([1,2,3]) be deprecated in favour of real.([1,2,3]) and imag.([1,2,3]) ? #20387

Closed
dlfivefifty opened this issue Feb 2, 2017 · 2 comments

Comments

@dlfivefifty
Copy link
Contributor

The inconsistency between real and abs caught me by surprise:

julia> versioninfo()
Julia Version 0.6.0-dev.2464
Commit d233cf9 (2017-01-29 05:47 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin16.3.0)
  CPU: Intel(R) Core(TM) i7-3820QM CPU @ 2.70GHz
  WORD_SIZE: 64
  BLAS: libgfortblas
  LAPACK: liblapack
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, ivybridge)

julia> abs([1,2,3])
WARNING: abs{T <: Number}(x::AbstractArray{T}) is deprecated, use abs.(x) instead.
Stacktrace:
 [1] depwarn(::String, ::Symbol) at ./deprecated.jl:62
 [2] abs(::Array{Int64,1}) at ./deprecated.jl:50
 [3] eval(::Module, ::Any) at ./boot.jl:236
 [4] eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:66
 [5] macro expansion at ./REPL.jl:97 [inlined]
 [6] (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:73
while loading no file, in expression starting on line 0
3-element Array{Int64,1}:
 1
 2
 3

julia> real([1,2,3])
3-element Array{Int64,1}:
 1
 2
 3
@fredrikekre
Copy link
Member

See #18566 and #18495 (comment)

@dlfivefifty
Copy link
Contributor Author

Ah, good point. So the answer is "No"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants