Package: pycsou
Pycsouis a Python 3 package for solving linear inverse problems with state-of-the-art proximal algorithms. The software implements in a highly modular way the main building blocks -cost functionals, penalty terms and linear operators- of generic penalised convex optimisation problems.Pycsou’s documentation is available athttps://matthieumeo.github.io/pycsou/html/indexThis Python library is inspired by the MATLABGlobalBioImproject. TheLinearOperatorinterface is based onscipy.sparseandPylops.FunctionalitiesPycsou makes it very easy to construct and solve penalised optimisation problems:It offers a rich collection of linear operators, loss functionals and penalty functionals commonly used in practice.It implementsarithmetic operationsfor linear operators, loss functionals and penalty functionals, hence allowing toadd,substract,scale,compose,exponentiateorstackthose various objects with one another and hence quickly designcustom complex optimisation problems.It implements a rich collection ofstate-of-the-art iterative proximal algorithms, includingefficient primal-dual splitting methodswhich involve only gradient steps, proximal steps and simple linear evaluations.It supportsmatrix-free linear operators, making it easy to work with large scale linear operators thatmay not necessarily fit in memory. Matrix-free linear operators can be implemented from scratch by subclassing the asbtract classLinearOperator, or built fromScipy sparse matrices,distributed Dask arraysorPylops matrix-free operators(which now support GPU computations).It implementsautomatic differentiation/proximation rules, allowing to automatically compute the derivative/proximal operators of functionals constructed from arithmetic operations on common functionals shipped with Pycsou.It leverages powerful rule-of-thumbs forsetting automaticallythe hyper-parameters of the provided proximal algorithms.Pycsou is designed to easily interface with the packagesscipy.sparseandPylops. This allows to use the sparse linear algebra routines fromscipy.sparseon PycsouLinearOperator, and  benefit from thelarge catalogueof linear operators and solvers fromPylops.InstallationPycsou requires Python 3.6 or greater.It is developed and tested on x86_64 systems running MacOS and Linux.DependenciesThe package dependencies are listed in the filesrequirements.txtandrequirements-conda.txt.
It is recommended to install dependencies usingMinicondaorAnaconda. This
is not just a pure stylistic choice but comes with somehiddenadvantages, such as the linking toIntel MKLlibrary (a highly optimized BLAS library created by Intel).To do so we create an environment namedpycsou(you can change that if you wish) and equip it
with the necessary requirements:>>condacreate-npycsoupython=3.6>>condainstall-npycsou--channel=conda-forge--file=requirements-conda.txt>>condaactivatepycsouQuick InstallPycsou is available onPypi. You can hence install it very simply via the command:>>pipinstallpycsouIf you have previously activated your conda environmentpipwill install Pycsou in said environment. Otherwise it will install it in your base environment together with the various dependencies obtained from the filerequirements.txt.Developper InstallIt is also possible to install Pycsou from the source for developpers:>>gitclonehttps://github.com/matthieumeo/pycsou>>cd<repository_dir>/>>pipinstall-e.The package documentation can be generated with:>>condainstall-npycsousphinx=='2.1.*'\sphinx_rtd_theme=='0.4.*'>>condaactivatepycsou>>python3setup.pybuild_sphinxYou can verify that the installation was successful by running the package doctests:>>condaactivatepycsou>>python3test.pyCiteFor citing this package, please see:http://doi.org/10.5281/zenodo.4486431