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

address concerns that depwarn for transpose is unclear #19205

Merged
merged 4 commits into from
Nov 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,9 @@ Deprecated or removed
* Sparse matrix functions `etree`, `ereach`, `csc_permute`, and `symperm` have been moved
to the [SuiteSparse.jl package](https://github.com/JuliaSparse/SuiteSparse.jl) ([#12231], [#17033]).

* The no-op `transpose` fallback has been deprecated. Consider introducing suitable
`transpose` methods or calling `permutedims(x, [2,1])` ([#13171], [#17075], [#17374]).
* The no-op `transpose` fallback for non-numeric arrays has been deprecated. Consider introducing suitable
`transpose` methods or calling `permutedims(x, (2, 1))` for matrices and `reshape(x, 1, length(x))` for
vectors. ([#13171], [#17075], [#17374]).

* The following macros have been deprecated ([#16219]):
* `@windows` is deprecated in favor of `is_windows()`
Expand Down
7 changes: 4 additions & 3 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -765,9 +765,10 @@ 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."),
depwarn(string("the no-op `transpose` for non-numeric arrays is deprecated, ",
"and no specific `transpose` method for $(typeof(x)) exists. Use ",
"`permutedims(x, (2, 1))` for matrices and `reshape(x, 1, length(x))` for vectors, ",
"or write a specific `transpose(x::$(typeof(x)))` method if appropriate."),
:transpose)
return x
end
Expand Down