diff --git a/base/deprecated.jl b/base/deprecated.jl index 10a50952a8cf7a..9f0247a809e210 100644 --- a/base/deprecated.jl +++ b/base/deprecated.jl @@ -784,6 +784,15 @@ function symperm{Tv,Ti}(A::SparseMatrixCSC{Tv,Ti}, pinv::Vector{Ti}) "Pkg.add(\"SuiteSparse\") to install SuiteSparse on Julia v0.5.")) end +# Deprecate no-op transpose fallback. Please see #13171 and #17075. +function transpose(x) + depwarn(string("the no-op `transpose` fallback is deprecated, and no more specific ", + "`transpose` method for $(typeof(x)) exists. Consider `permutedims(x, [2, 1])` ", + "or writing a specific `transpose(x::$(typeof(x)))` method if appropriate."), + :transpose) + return x +end + # During the 0.5 development cycle, do not add any deprecations below this line # To be deprecated in 0.6 diff --git a/base/operators.jl b/base/operators.jl index 7dc3aa539ab237..91b0e0fd4da377 100644 --- a/base/operators.jl +++ b/base/operators.jl @@ -293,7 +293,6 @@ fldmod1{T<:Real}(x::T, y::T) = (fld1(x,y), mod1(x,y)) fldmod1{T<:Integer}(x::T, y::T) = (fld1(x,y), mod1(x,y)) # transpose -transpose(x) = throw(ArgumentError("transpose not implemented for $(typeof(x)). Consider permutedims.")) ctranspose(x) = conj(transpose(x)) conj(x) = x