Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -552,9 +552,9 @@ std::vector<std::vector<double>> computeImSVsZ(double a, double y, double beta,
|
|
| 552 |
CubicRoots roots = solveCubic(coef_a, coef_b, coef_c, coef_d);
|
| 553 |
|
| 554 |
// Extract imaginary and real parts
|
| 555 |
-
ims_values1[i] = std::abs(roots.root1.imag());
|
| 556 |
-
ims_values2[i] = std::abs(roots.root2.imag());
|
| 557 |
-
ims_values3[i] = std::abs(roots.root3.imag());
|
| 558 |
|
| 559 |
real_values1[i] = roots.root1.real();
|
| 560 |
real_values2[i] = roots.root2.real();
|
|
@@ -1957,7 +1957,6 @@ with tab2:
|
|
| 1957 |
positives = 0
|
| 1958 |
negatives = 0
|
| 1959 |
|
| 1960 |
-
# Handle NaN values
|
| 1961 |
# Handle NaN values
|
| 1962 |
r1 = real_values1[i] if not np.isnan(real_values1[i]) else 0
|
| 1963 |
r2 = real_values2[i] if not np.isnan(real_values2[i]) else 0
|
|
|
|
| 552 |
CubicRoots roots = solveCubic(coef_a, coef_b, coef_c, coef_d);
|
| 553 |
|
| 554 |
// Extract imaginary and real parts
|
| 555 |
+
ims_values1[i] = std::abs(roots.root1.imag()); // already using abs in C++
|
| 556 |
+
ims_values2[i] = std::abs(roots.root2.imag()); // already using abs in C++
|
| 557 |
+
ims_values3[i] = std::abs(roots.root3.imag()); // already using abs in C++
|
| 558 |
|
| 559 |
real_values1[i] = roots.root1.real();
|
| 560 |
real_values2[i] = roots.root2.real();
|
|
|
|
| 1957 |
positives = 0
|
| 1958 |
negatives = 0
|
| 1959 |
|
|
|
|
| 1960 |
# Handle NaN values
|
| 1961 |
r1 = real_values1[i] if not np.isnan(real_values1[i]) else 0
|
| 1962 |
r2 = real_values2[i] if not np.isnan(real_values2[i]) else 0
|