Skip to content

BUG: lcp_lemke #768

Open
Open
@oyamad

Description

@oyamad

Bug found by an instance in some benchmark script generated by ChatGPT:

import numpy as np
from quantecon.optimize import lcp_lemke

n = 10
seed = 0
rng = np.random.RandomState(seed)
A = rng.standard_normal((n, n))
M = A.T @ A + np.eye(n)
q = rng.standard_normal(n)
res = lcp_lemke(M, q)
res.z
array([ 0.        ,  0.        ,  0.3476126 ,  0.        ,  0.        ,
        0.        ,  0.        ,  0.27700921,  0.        , -0.40131452])

The condition z >= 0 is violated.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions