bwohlberg / sporco

Sparse Optimisation Research Code
http://brendt.wohlberg.net/software/SPORCO/
BSD 3-Clause "New" or "Revised" License
258 stars 37 forks source link

Cannot import sporco #31

Closed JayJiang99 closed 6 months ago

JayJiang99 commented 6 months ago

Under python 3.8, after pip install sporco. When I try to import sporco.dictlrn, I got the following error: 4 from sporco.dictlrn import dictlrn 5 from sporco.admm import cbpdn,ccmod 6 from sporco import cnvrep

File ~/anaconda3/envs/cdl/lib/python3.8/site-packages/sporco/init.py:8 3 version = '0.2.1' 6 # This is a temporary solution to the circular imports resulting from the 7 # use of the renamed_function decorator ----> 8 import sporco.linalg

File ~/anaconda3/envs/cdl/lib/python3.8/site-packages/sporco/linalg.py:26 23 have_numexpr = True 25 from sporco._util import renamed_function ---> 26 from sporco.array import zdivide, subsample_array 29 author = """Brendt Wohlberg brendt@ieee.org""" 33 all = ['inner', 'dot', 'valid_adjoint', 'solvedbi_sm', 'solvedbi_sm_c', 34 'solvedbd_sm', 'solvedbd_sm_c', 'solvemdbi_ism', 'solvemdbi_rsm', 35 'solvemdbi_cg', 'lu_factor', 'lu_solve_ATAI', 'lu_solve_AATI', 36 'cho_factor', 'cho_solve_ATAI', 'cho_solve_AATI', 37 'solve_symmetric_sylvester', 'block_circulant', 'rrs', 'pca', ... --> 299 res = zeros((n, n), v.dtype) 300 if k >= 0: 301 i = k

MemoryError: Unable to allocate 512. GiB for an array with shape (262144, 262144) and data type float64...

I could import sporco one day earlier but I cannot do that with the same code now.