pyunlocbox icon indicating copy to clipboard operation
pyunlocbox copied to clipboard

WIP: fixing broken support for complex numbers and adding new complex functionality

Open ThomasA opened this issue 6 years ago • 8 comments

This is a work-in-progress pull request that I recommend not to merge in until I am done fixing and implementing new complex support features. I will be adding commits to this branch as I go along.

This PR addresses #11

ThomasA avatar Mar 29 '18 15:03 ThomasA

Coverage Status

Coverage decreased (-0.2%) to 98.376% when pulling a9cfec3b51140973f135985ebd01068d97edff0a on ThomasA:fix_complex into ee37c50586a445e2a8d851028d5e878a16164e89 on epfl-lts2:master.

coveralls avatar Mar 30 '18 20:03 coveralls

I am currently working on making the compressed sensing forward-backward example from the tutorial work. So far the example seems able to complete without discarding imaginary parts anywhere, but at least the l-2 norm still computes wrong and my so far un-committed attempts at fixing it still lead to wrong solutions...

ThomasA avatar Apr 01 '18 21:04 ThomasA

The above-mentioned compressed sensing forward-backward example now seems to work correctly. The next steps will be to determine which other parts of the package may have complex number issues and also to implement further tests to validate the so far altered code for complex numbers.

ThomasA avatar Apr 01 '18 21:04 ThomasA

I am adding tests to test everything with complex numbers as well. Should I test with complex numbers in addition to the already existing tests, or should I replace the numbers in the existing tests with complex numbers? In principle, testing everything with complex numbers should be more general and ensure that it works with real numbers as well, but maybe someone would like to keep the strictly real tests?

ThomasA avatar Jul 06 '18 09:07 ThomasA

I have been thinking about this adaptation of the toolbox to handle complex numbers. Wouldn't it be better to just input n-by-2 matrices instead of n-dimensional complex vectors? Are there any operations currently implemented in pyunlocbox that would fail if you were simply to add an extra dimension to your input to account for the imaginary part?

rodrigo-pena avatar Sep 13 '18 14:09 rodrigo-pena

Hi @ThomasA. I know it's been a long time, but may I ask what is the status of this PR?

(There are some more commits in another branch of yours at https://github.com/ThomasA/pyunlocbox/commits/fix_complex_tmp.)

mdeff avatar Mar 24 '20 17:03 mdeff

@ThomasA if you want to finish this, I would be happy to help.

nperraud avatar Jan 27 '21 13:01 nperraud

It has been so long now that I need to dig around a bit to remember where I got to, but it would actually be nice exercise to finish this up.

ThomasA avatar Jan 27 '21 14:01 ThomasA