<p dir="auto">When looking at the meson-generated <code class="notranslate">build.ninja</code> on windows, on a machine that is duplicating the CI build, it seems there is no use of msvc only gcc. Is this correct? If so it might be nice to document this in the <a href="https://scipy.github.io/devdocs/dev/contributor/meson.html#meson-frequently-asked-questions" rel="nofollow">meson build faq</a>. Also I think the build requires the rtools gcc compiler, I have had problems with standard mingw.</p>
<p dir="auto">Another niggle: <code class="notranslate">meson build --debug</code> on windows sets the gcc flags to <code class="notranslate">"-O2" "-g"</code>. Is using <code class="notranslate">-O2</code> intentional for the debug builds?</p>
<p dir="auto">I want to compute the matrix exponential of a nice, 2x2 matrix, but scipy fails with "ValueError: setting an array element with a sequence."<br>
If I perturb the matrix ever so slightly, it does work however -- perhaps related to the fact that it's invoking a sparse solver. Example below, followed by the perturbation example:</p>
<p dir="auto">import numpy<br>
import scipy.linalg</p>
<p dir="auto">A = numpy.matrix([[-1,1],[0,-2]])<br>
B = scipy.linalg.expm(A)</p>
<hr>
<p dir="auto">AttributeError                            Traceback (most recent call last)<br>
 in ()<br>
----&gt; 1 B = scipy.linalg.expm(A)</p>
<p dir="auto">C:\Python27\lib\site-packages\scipy\linalg\matfuncs.pyc in expm(A, q)<br>
171     # Input checking and conversion is provided by sparse.linalg.expm().<br>
172     import scipy.sparse.linalg<br>
--&gt; 173     return scipy.sparse.linalg.expm(A)<br>
174<br>
175</p>
<p dir="auto">C:\Python27\lib\site-packages\scipy\sparse\linalg\matfuncs.pyc in expm(A)<br>
619     theta_13 = 4.25<br>
620     s = max(int(np.ceil(np.log2(eta_5 / theta_13))), 0)<br>
--&gt; 621     s = s + _ell(2**-s * h.A, 13)<br>
622     U, V = h.pade13_scaled(s)<br>
623     X = _solve_P_Q(U, V, structure=structure)</p>
<p dir="auto">C:\Python27\lib\site-packages\scipy\sparse\linalg\matfuncs.pyc in _ell(A, m)<br>
806<br>
807     alpha = A_abs_onenorm / (_onenorm(A) * abs_c_recip)<br>
--&gt; 808     log2_alpha_div_u = np.log2(alpha/u)<br>
809     value = int(np.ceil(log2_alpha_div_u / (2 * m)))<br>
810     return max(value, 0)</p>
<p dir="auto">AttributeError: log2</p>
<hr>
<p dir="auto"><em>Perturbation</em></p>
<h1 dir="auto">Here I perturb the matrix ever so slightly, and now it works as expected:</h1>
<p dir="auto">import numpy<br>
import scipy.linalg</p>
<p dir="auto">A = numpy.matrix([[-1,1],[1e-12,-2]])<br>
B = scipy.linalg.expm(A)<br>
print(B)</p>
<p dir="auto">outputs:<br>
[[  3.67879441e-01   2.32544158e-01]<br>
[  2.32544158e-13   1.35335283e-01]]</p>