Skip to content

Commit

Permalink
Deprecate axes().
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-laforge committed Sep 9, 2018
1 parent 5591a8f commit 35d64d9
Showing 1 changed file with 0 additions and 36 deletions.
36 changes: 0 additions & 36 deletions src/base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -317,42 +317,6 @@ end
#==Constructor-like functions
===============================================================================#

#axes function:
#TODO: deprecate axes()... left for reference
#Interface is a bit irregular, but should be easy to use...
#-------------------------------------------------------------------------------
function axes(a1::Symbol)
if :smith == a1
return :smith_Z
elseif :polar == a1
return :polar
else
throw(MethodError(axes, (a1,)))
end
end

function axes(a1::Symbol, a2::Symbol; ref = nothing)
if :smith == a1
return Symbol("smith_$(a2)_$(ref)")
elseif ref != nothing
error("cannot set ref for axes(:$a1, :$a2)")
end

if :polar == a1
return Symbol("polar_$(a2)")
else
return Symbol("rect_$(a1)_$(a2)")
end
end

function axes(a1::Symbol, a2::Symbol, a3::Symbol)
if :polar == a1
return Symbol("polar_$(a2)_$(a3)")
else
throw(MethodError(axes, (a1,a2,a3)))
end
end


#==Accessors
===============================================================================#
Expand Down

0 comments on commit 35d64d9

Please sign in to comment.