{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/21037","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/21037/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/21037/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/21037/events","html_url":"https://github.com/JuliaLang/julia/issues/21037","id":214439569,"number":21037,"title":"new syntax for transpose","user":{"login":"StefanKarpinski","id":153596,"avatar_url":"https://avatars2.githubusercontent.com/u/153596?v=4","gravatar_id":"","url":"https://api.github.com/users/StefanKarpinski","html_url":"https://github.com/StefanKarpinski","followers_url":"https://api.github.com/users/StefanKarpinski/followers","following_url":"https://api.github.com/users/StefanKarpinski/following{/other_user}","gists_url":"https://api.github.com/users/StefanKarpinski/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanKarpinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanKarpinski/subscriptions","organizations_url":"https://api.github.com/users/StefanKarpinski/orgs","repos_url":"https://api.github.com/users/StefanKarpinski/repos","events_url":"https://api.github.com/users/StefanKarpinski/events{/privacy}","received_events_url":"https://api.github.com/users/StefanKarpinski/received_events","type":"User","site_admin":false},"labels":[{"id":61807486,"url":"https://api.github.com/repos/JuliaLang/julia/labels/linear%20algebra","name":"linear algebra","color":"aa8800","default":false},{"id":163368715,"url":"https://api.github.com/repos/JuliaLang/julia/labels/parser","name":"parser","color":"bfdadc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":65,"created_at":"2017-03-15T16:03:19Z","updated_at":"2017-11-20T14:44:56Z","closed_at":null,"author_association":"OWNER","body":"Now that `.op` is generally the vectorized form of `op`, it's very confusing that `.'` means transpose rather than the vectorized form of `'` (adjoint, aka ctranspose). This issue is for discussing alternative syntaxes for transpose and/or adjoint."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/345716201","html_url":"https://github.com/JuliaLang/julia/issues/21037#issuecomment-345716201","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/21037","id":345716201,"user":{"login":"StefanKarpinski","id":153596,"avatar_url":"https://avatars2.githubusercontent.com/u/153596?v=4","gravatar_id":"","url":"https://api.github.com/users/StefanKarpinski","html_url":"https://github.com/StefanKarpinski","followers_url":"https://api.github.com/users/StefanKarpinski/followers","following_url":"https://api.github.com/users/StefanKarpinski/following{/other_user}","gists_url":"https://api.github.com/users/StefanKarpinski/gists{/gist_id}","starred_url":"https://api.github.com/users/StefanKarpinski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StefanKarpinski/subscriptions","organizations_url":"https://api.github.com/users/StefanKarpinski/orgs","repos_url":"https://api.github.com/users/StefanKarpinski/repos","events_url":"https://api.github.com/users/StefanKarpinski/events{/privacy}","received_events_url":"https://api.github.com/users/StefanKarpinski/received_events","type":"User","site_admin":false},"created_at":"2017-11-20T14:44:56Z","updated_at":"2017-11-20T14:44:56Z","author_association":"OWNER","body":"@mahiki, you're NumPy example:\r\n```python\r\nimport numpy as np\r\n# define matrix X of n columns, with m rows of observations\r\nerror = X.dot(Theta.T) - Y\r\ngradient = (1 / m) * (X.dot(Theta.T) - Y).T.dot(X)\r\n```\r\nwould be written in any Julia as:\r\n```jl\r\nerror = X*Θ' - Y\r\ngradient = (1/m) * (X*Θ')' * X\r\n```\r\nwhich seems about as clear and mathematical as it gets. If your data is real, then adjoint and transpose are the same operation, which may be why you're using transpose above – but mathematically adjoint is the right operation. As @ararslan said, `X'` has *always* meant `adjoint` in Julia (and in Matlab as well). It was previously called `ctranspose` short for \"[complex transpose](https://en.wikipedia.org/wiki/Conjugate_transpose)\" but that name was a misnomer since the defining property of the operator is that\r\n```jl\r\ndot(A*x, y) == dot(x, A'y)\r\n```\r\nwhich is the defining property of the [Hermitian adjoint](https://en.wikipedia.org/wiki/Hermitian_adjoint) but happens to be satisfied by the conjugate transpose when `A` is a complex matrix. That's why \"adjoint\" is the right generic term for this operator.\r\n\r\nAll that said, I voted above for both `transpose(a)` and `a.'` since I think it would be fine for `a.'` to mean structural transpose. It would work as expected, and even though it would not be recursive and therefore not \"mathematically correct\" in some generic code, having it work as expected seems good enough."}}
{"actor":{"display_login":"StefanKarpinski"}}