<div dir="ltr">Hindsight, seems to be a duplicate of: <a href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1136873">https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1136873</a></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Mon, 29 Jun 2026 at 15:49, Ujjwal Sarswat <<a href="mailto:ujjwal.sarswat@canonical.com">ujjwal.sarswat@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Source: siconos<br>
Severity: important<br>
Tags: patch<br>
X-Debbugs-Cc: <a href="mailto:ujjwal.sarswat@canonical.com" target="_blank">ujjwal.sarswat@canonical.com</a><br>
<br>
Dear Maintainer,<br>
<br>
I've encountered an issue while building `siconos` locally. The `siconos.kernel` test suite fails during `test_bouncing_ball.py` with a `ValueError: setting an array element with a sequence.` <br>
<br>
This is caused by stricter dimensionality enforcement in NumPy 2.4. It no longer permits implicitly converting 1-dimensional arrays or sequences into Python scalars when assigning to a specific coordinate in a pre-allocated array. The value must be explicitly extracted as a scalar by appending `[0]`.<br>
<br>
Relevant Traceback snippet:<br>
----------------------------------------------------------------------<br>
test_bouncing_ball.py::test_bouncing_ball2 FAILED                        [ 50%]<br>
test_bouncing_ball.py::test_bouncing_ball3 FAILED                        [ 75%]<br>
test_bouncing_ball.py::test_bouncing_ball4 FAILED                        [100%]<br>
<br>
=================================== FAILURES ===================================<br>
_____________________________ test_bouncing_ball2 ______________________________<br>
TypeError: only 0-dimensional arrays can be converted to Python scalars<br>
<br>
The above exception was the direct cause of the following exception:<br>
[...]<br>
        # Get the values to be plotted<br>
        # ->saved in a matrix data<br>
<br>
        s_d.computeOneStep()<br>
<br>
        data = np.empty((nb_time_steps + 1, 5))<br>
        data_d = np.empty((nb_time_steps + 1, 5))<br>
<br>
        data[0, 0] = t0<br>
        data[0, 1] = ball.q()[0]<br>
        data[0, 2] = ball.velocity()[0]<br>
        data[0, 3] = ball.p(1)[0]<br>
>       data[0, 4] = inter.lambda_(1)<br>
        ^^^^^^^^^^<br>
E       ValueError: setting an array element with a sequence.<br>
<br>
test_bouncing_ball.py:240: ValueError<br>
----------------------------------------------------------------------<br>
<br>
Upstream context: <br>
There is no need to forward this upstream. Upstream is currently working on major architectural changes (currently on rc1) that remove or significantly alter the directories associated with this bug. <br>
<br>
However, since those upstream changes will take time to finalize and land, a simple interim patch indexing the array with `[0]` is necessary for Debian to restore the build and pass the tests.<br>
<br>
This patch has been merged into Ubuntu.<br>
<br>
--- a/kernel/swig/tests/test_bouncing_ball.py<br>
+++ b/kernel/swig/tests/test_bouncing_ball.py<br>
@@ -237,13 +237,13 @@<br>
     data[0, 1] = ball.q()[0]<br>
     data[0, 2] = ball.velocity()[0]<br>
     data[0, 3] = ball.p(1)[0]<br>
-    data[0, 4] = inter.lambda_(1)<br>
+    data[0, 4] = inter.lambda_(1)[0]<br>
<br>
     data_d[0, 0] = t0<br>
     data_d[0, 1] = ball_d.q()[0]<br>
     data_d[0, 2] = ball_d.velocity()[0]<br>
     data_d[0, 3] = ball_d.p(1)[0]<br>
-    data_d[0, 4] = inter_d.lambda_(1)<br>
+    data_d[0, 4] = inter_d.lambda_(1)[0]<br>
<br>
     k = 1<br>
<br>
Thanks,<br>
vmpyr<br>
<br>
<br>
-- System Information:<br>
Debian Release: forky/sid<br>
  APT prefers resolute-updates<br>
  APT policy: (500, 'resolute-updates'), (500, 'resolute-security'), (500, 'resolute')<br>
Architecture: amd64 (x86_64)<br>
<br>
Kernel: Linux 7.0.0-22-generic (SMP w/16 CPU threads; PREEMPT)<br>
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set<br>
Shell: /bin/sh linked to /usr/bin/dash<br>
Init: systemd (via /run/systemd/system)<br>
LSM: AppArmor: enabled<br>
</blockquote></div>