Skip to content

Commit

Permalink
TST: linalg: test ?gesdd not segfaulting for a.size > int_max
Browse files Browse the repository at this point in the history
  • Loading branch information
ev-br committed Mar 28, 2024
1 parent 16512f2 commit c51ad59
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scipy/linalg/tests/test_decomp.py
Expand Up @@ -1089,6 +1089,15 @@ class TestSVD_GESVD(TestSVD_GESDD):
lapack_driver = 'gesvd'


@pytest.mark.xslow
def test_svd_gesdd_nofegfault():
# svd(a) with a.size > INT_MAX does not segfault
# cf https://github.com/scipy/scipy/issues/14001
df=np.ones((4799,53130), dtype=np.float64)
with assert_raises(Exception):
scipy.linalg.svd(df)


class TestSVDVals:

def test_empty(self):
Expand Down

0 comments on commit c51ad59

Please sign in to comment.