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

ArgumentError: reducing over an empty collection is not allowed #2

Open
KenZhenLin opened this issue Aug 3, 2020 · 0 comments
Open

Comments

@KenZhenLin
Copy link

Hello, this package has been very helpful! But I got this error: "ArgumentError: reducing over an empty collection is not allowed" by running the following example in Julia 1.3.1:

Random.seed!(1234)
n = 5
m = 3
P = randn(n,n)
P = (P+P')/2
P = 2*P
q = randn(n)
A = randn(m,n)
b = rand(m)
rmax = 2.5
x=QPnorm.solve(P, q, A, b, zeros(n); r_min=0.0, r_max = rmax)

It looks like the error occurs in the maximum function in line 331 of qp_norm_boundary.jl. Could you please provide some help? Thanks!

The complete problem data are given below:

P
5×5 Array{Float64,2}:
1.73469 1.31013 -1.05498 -0.792818 2.42857
1.31013 1.06563 -0.291027 0.251159 -1.91372
-1.05498 -0.291027 0.256129 2.2225 0.277734
-0.792818 0.251159 2.2225 0.144233 -2.61016
2.42857 -1.91372 0.277734 -2.61016 -6.42272

q
5-element Array{Float64,1}:
-0.07401454242444336
0.1509756176321479
0.7692782605345824
-0.31015257323306406
-0.6027068905147959

A
3×5 Array{Float64,2}:
-1.27967 -0.036446 0.896748 -1.54143 -0.580517
0.997317 0.141974 -0.51353 -0.0801625 -0.315437
0.302423 0.521273 -0.764799 -1.09122 -1.36145

b
3-element Array{Float64,1}:
0.15050782744925795
0.14732938279328955
0.2834013103457036

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

1 participant