d6e00edb6b5e23c0aafc7b169f7517fe39da0fd6,mathics/builtin/linalg.py,Eigenvectors,apply,#Eigenvectors#Any#Any#,999

Before Change


        // Try to sort the results as complex numbers
        except TypeError:
            try: 
                eigenvects = sorted(eigenvects,
                                    key=lambda v_c: -abs(v_c[0]))
            // Don"t sort the results at all
            except TypeError:
                pass

After Change


            return evaluation.message(
                "Eigenvectors", "eigenvecnotimplemented", m)

        if all(v.is_complex for (v, _, _) in eigenvects):
            eigenvects.sort(key=lambda v: (abs(v[0]), - re(v[0]), - im(v[0])),
                            reverse=True)
        else:
            eigenvects.sort(key=lambda v: from_sympy(v[0]).get_sort_key())

        result = []
        for val, count, basis in eigenvects:
            // Select the i"th basis vector, convert matrix to vector,
            // and convert from sympy
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: mathics/Mathics
Commit Name: d6e00edb6b5e23c0aafc7b169f7517fe39da0fd6
Time: 2020-09-06
Author: pablo-escobar@riseup.net
File Name: mathics/builtin/linalg.py
Class Name: Eigenvectors
Method Name: apply


Project Name: pantsbuild/pants
Commit Name: 765fe64b6e96c365aaee4867c5a8381a883c5bc6
Time: 2020-08-16
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/core/goals/fmt.py
Class Name:
Method Name: fmt


Project Name: mathics/Mathics
Commit Name: deed936ca0bfa5998af0225fab99c47bd2bc4b6d
Time: 2020-09-06
Author: pablo-escobar@riseup.net
File Name: mathics/builtin/linalg.py
Class Name: Eigenvalues
Method Name: apply