[From nobody Mon Jun 29 11:29:04 2026
Received: (at submit) by bugs.debian.org; 29 Jun 2026 10:16:36 +0000
X-Spam-Checker-Version: SpamAssassin 4.0.1-bugs.debian.org_2005_01_02
 (2024-03-25) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-7.9 required=4.0 tests=BAYES_00,FOURLA,NO_RELAYS,
 XMAILER_REPORTBUG autolearn=ham autolearn_force=no
 version=4.0.1-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 25; hammy, 150; neutral, 139; spammy,
 0. spammytokens: hammytokens:0.000-+--XDebbugsCc,
 0.000-+--X-Debbugs-Cc, 0.000-+--H*Ad:N*Bug, 0.000-+--H*Ad:N*Tracking,
 0.000-+--HTo:N*Debian
Return-path: &lt;ujjwal.sarswat@canonical.com&gt;
Received: via submission by buxtehude.debian.org with esmtp (Exim 4.96)
 (envelope-from &lt;ujjwal.sarswat@canonical.com&gt;) id 1we92Z-001tEa-2x
 for submit@bugs.debian.org; Mon, 29 Jun 2026 10:16:36 +0000
Content-Type: text/plain; charset=&quot;us-ascii&quot;
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Ujjwal Sarswat &lt;ujjwal.sarswat@canonical.com&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: siconos: test_bouncing_ball fails with ValueError: setting an array
 element with a sequence
Message-ID: &lt;178272818483.265272.4788225930285924307.reportbug@carbon&gt;
X-Mailer: reportbug 13.2.0+ubuntu1
Date: Mon, 29 Jun 2026 15:46:24 +0530
Delivered-To: submit@bugs.debian.org

Source: siconos
Severity: important
Tags: patch
X-Debbugs-Cc: ujjwal.sarswat@canonical.com

Dear Maintainer,

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.` 

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]`.

Relevant Traceback snippet:
----------------------------------------------------------------------
test_bouncing_ball.py::test_bouncing_ball2 FAILED                        [ 50%]
test_bouncing_ball.py::test_bouncing_ball3 FAILED                        [ 75%]
test_bouncing_ball.py::test_bouncing_ball4 FAILED                        [100%]

=================================== FAILURES ===================================
_____________________________ test_bouncing_ball2 ______________________________
TypeError: only 0-dimensional arrays can be converted to Python scalars

The above exception was the direct cause of the following exception:
[...]
        # Get the values to be plotted
        # -&gt;saved in a matrix data
    
        s_d.computeOneStep()
    
        data = np.empty((nb_time_steps + 1, 5))
        data_d = np.empty((nb_time_steps + 1, 5))
    
        data[0, 0] = t0
        data[0, 1] = ball.q()[0]
        data[0, 2] = ball.velocity()[0]
        data[0, 3] = ball.p(1)[0]
&gt;       data[0, 4] = inter.lambda_(1)
        ^^^^^^^^^^
E       ValueError: setting an array element with a sequence.

test_bouncing_ball.py:240: ValueError
----------------------------------------------------------------------

Upstream context: 
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. 

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.

This patch has been merged into Ubuntu.

--- a/kernel/swig/tests/test_bouncing_ball.py
+++ b/kernel/swig/tests/test_bouncing_ball.py
@@ -237,13 +237,13 @@
     data[0, 1] = ball.q()[0]
     data[0, 2] = ball.velocity()[0]
     data[0, 3] = ball.p(1)[0]
-    data[0, 4] = inter.lambda_(1)
+    data[0, 4] = inter.lambda_(1)[0]
 
     data_d[0, 0] = t0
     data_d[0, 1] = ball_d.q()[0]
     data_d[0, 2] = ball_d.velocity()[0]
     data_d[0, 3] = ball_d.p(1)[0]
-    data_d[0, 4] = inter_d.lambda_(1)
+    data_d[0, 4] = inter_d.lambda_(1)[0]
 
     k = 1

Thanks,
vmpyr


-- System Information:
Debian Release: forky/sid
  APT prefers resolute-updates
  APT policy: (500, 'resolute-updates'), (500, 'resolute-security'), (500, 'resolute')
Architecture: amd64 (x86_64)

Kernel: Linux 7.0.0-22-generic (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
]