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

ERROR: MethodError: no method matching size(::SVD{Float64,Float64,Array{Float64,2}}, ::Int64) #28438

Closed
mohamed82008 opened this issue Aug 4, 2018 · 2 comments

Comments

@mohamed82008
Copy link
Contributor

Hi,

The following piece of code:

using LinearAlgebra, SparseArrays
size(svd(rand(3,3)), 1)

gives the error:

ERROR: MethodError: no method matching size(::SVD{Float64,Float64,Array{Float64,2}}, ::Int64)

on:

Julia Version 0.7.0-rc2.0
Commit 78540cba4c (2018-08-02 19:14 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, skylake)

but works fine on:

Julia Version 0.6.4
Commit 9d11f62bcb* (2018-07-09 19:09 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=16)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, broadwell)
mohamed82008 added a commit to mohamed82008/julia that referenced this issue Aug 4, 2018
Closes JuliaLang#28438. And first PR!
@fredrikekre
Copy link
Member

You are comparing two completely different things. In Julia v0.6 size(svd(rand(m,n)), 1) is just the size of a length 3 tuple (so you might just aswell replace that with 3).

@mohamed82008
Copy link
Contributor Author

I see, missed that. Thanks.

andreasnoack pushed a commit that referenced this issue Aug 5, 2018
* Define `size` for SVD

Closes #28438. And first PR!

* add test to 3-arg `ldiv!` on `SVD` which calls `size`

* github pampering
ararslan pushed a commit that referenced this issue Aug 5, 2018
* Define `size` for SVD

Closes #28438. And first PR!

* add test to 3-arg `ldiv!` on `SVD` which calls `size`

* github pampering

(cherry picked from commit e0876d2)
KristofferC pushed a commit that referenced this issue Feb 11, 2019
* Define `size` for SVD

Closes #28438. And first PR!

* add test to 3-arg `ldiv!` on `SVD` which calls `size`

* github pampering
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants