I'm trying to visualize the numerical range of a matrix on a website. For this, I need to calculate the eigenvalues of a general matrix with complex elements. This should be available since #1743 was merge. Yet, I get the following errors.
<script src="https://unpkg.com/mathjs@10.1.1/lib/browser/math.js"></script>
<script type="text/javascript">
console.log(math.eigs([[1, 2], [3, 4]]));
console.log(math.eigs([[3, -2], [4, -1]]));
console.log(math.eigs([[3, -2], [math.complex(4, 2), -1]]));
</script>
The first two line work as expected, the last one results in the following error
Uncaught TypeError: No ordering relation is defined for complex numbers
at Function.Complex, Complex (smaller.js:75:13)
at smaller (typed-function.js:1086:85)
at complexEigs.js:111:18
at complexEigs.js:22:15
at j (eigs.js:100:12)
at Function.Array (eigs.js:51:14)
at Object.eigs (typed-function.js:1085:85)
at (index):1:14924
Complex, Complex @ smaller.js:75
smaller @ typed-function.js:1086
(anonymous) @ complexEigs.js:111
(anonymous) @ complexEigs.js:22
j @ eigs.js:100
Array @ eigs.js:51
eigs @ typed-function.js:1085
(anonymous) @ (index):1
Am I doing something? Did I misunderstand the nature of #1743?
I'm trying to visualize the numerical range of a matrix on a website. For this, I need to calculate the eigenvalues of a general matrix with complex elements. This should be available since #1743 was merge. Yet, I get the following errors.
The first two line work as expected, the last one results in the following error
Am I doing something? Did I misunderstand the nature of #1743?