lineax icon indicating copy to clipboard operation
lineax copied to clipboard

Ambiguous output from successful solution using `lineax.RESULTS`

Open LouisDesdoigts opened this issue 8 months ago • 1 comments

I originally encountered this issue in optimistix but realised it originates here.

After a successful solution is found the solution.result value is 0 when it has succeeded, with a series of other values for the various failure modes, all fine so far. However following the docs to get a 'human-readable' interpretation using lineax.RESULTS[sol.result] returns an empty string when it has succeeded. As far as I can tell without knowledge of Enumeration objects or looking at the code directly there is really no way to know that is actually a good thing, rather than some form of 'null result' as I originally interpreted it.

Maybe this is intentional for some deeper reason, but not as far as I can see. I think having the success message print out something as simple a 'success' would go a long way for new users.

Let me know if you're interested and Ill make a PR for this.

LouisDesdoigts avatar Oct 31 '23 05:10 LouisDesdoigts