Skip to content

Commit

Permalink
Return ctranspose(V) instead of transpose(V) in svd.
Browse files Browse the repository at this point in the history
  • Loading branch information
ViralBShah committed Jan 11, 2013
1 parent 8c8cb9d commit afcace2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion base/linalg_dense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ svdt(x::Number,vecs::Bool,thin::Bool) = vecs ? (x==0?one(x):x/abs(x),abs(x),one(

function svd(x::StridedMatrix,vecs,thin)
(u, s, vt) = svdt(x,vecs,thin)
return (u, s, vt.')
return (u, s, vt')
end

svd(A) = svd(A,true,false)
Expand Down
2 changes: 1 addition & 1 deletion doc/stdlib/base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1721,7 +1721,7 @@ Linear algebra functions in Julia are largely implemented by calling functions f

.. function:: svd(A) -> U, S, V

Compute the SVD of A, returning ``U``, ``S``, and ``V`` such that ``A = U*S*V.'``.
Compute the SVD of A, returning ``U``, ``S``, and ``V`` such that ``A = U*S*V'``.

.. function:: svdt(A) -> U, S, Vt

Expand Down
2 changes: 1 addition & 1 deletion extras/image.jl
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ function imfilter{T}(img::Matrix{T}, filter::Matrix{T}, border::String, value)
error("wrong border treatment")
end
# check if separable
U, S, V = svd(filter)
U, S, V = svdt(filter)
separable = true;
for i = 2:length(S)
# assumption that <10^-7 \approx 0
Expand Down

1 comment on commit afcace2

@ViralBShah
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closes #912.

Please sign in to comment.