If you try to call nonneg_lsq() with "gram = true" and "alg = pivot" then the logic will set "alg = pivot_cache".
This will then force an error in the next logic block "throw(ArgumentError("Specified algorithm $alg not recognized."))" as "alg == :pivot_cache" doesn't appear anywhere.
I think a simple fix for this is to have the first portion set "alg = pivot" (already done) and "variant = cache".
If you try to call nonneg_lsq() with "gram = true" and "alg = pivot" then the logic will set "alg = pivot_cache". This will then force an error in the next logic block "throw(ArgumentError("Specified algorithm $alg not recognized."))" as "alg == :pivot_cache" doesn't appear anywhere. I think a simple fix for this is to have the first portion set "alg = pivot" (already done) and "variant = cache".