#1136873 siconos: FTBFS: E ValueError: setting an array element with a sequence.

#1136873#5
Date:
2026-05-16 16:28:05 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202605/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:siconos, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean --with numpy3 --no-parallel --builddirectory=/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu
   dh_auto_clean -O--no-parallel -O--builddirectory=/<<BUILDDIR>>/siconos-4.4.0\+dfsg/obj-x86_64-linux-gnu
   dh_autoreconf_clean -O--no-parallel -O--builddirectory=/<<BUILDDIR>>/siconos-4.4.0\+dfsg/obj-x86_64-linux-gnu
   dh_clean -O--no-parallel -O--builddirectory=/<<BUILDDIR>>/siconos-4.4.0\+dfsg/obj-x86_64-linux-gnu
	rm -f debian/debhelper-build-stamp
	rm -rf debian/.debhelper/
	rm -f -- debian/siconos.substvars debian/siconos-mechanics-tools.substvars debian/libsiconos-numerics7.substvars debian/libsiconos-numerics-dev.substvars debian/libsiconos-kernel7.substvars debian/libsiconos-kernel-dev.substvars debian/libsiconos-control7.substvars debian/libsiconos-control-dev.substvars debian/libsiconos-mechanics7.substvars debian/libsiconos-mechanics-dev.substvars debian/libsiconos-io7.substvars debian/libsiconos-io-dev.substvars debian/python3-siconos.substvars debian/files
	rm -fr -- debian/siconos/ debian/tmp/ debian/siconos-mechanics-tools/ debian/libsiconos-numerics7/ debian/libsiconos-numerics-dev/ debian/libsiconos-kernel7/ debian/libsiconos-kernel-dev/ debian/libsiconos-control7/ debian/libsiconos-control-dev/ debian/libsiconos-mechanics7/ debian/libsiconos-mechanics-dev/ debian/libsiconos-io7/ debian/libsiconos-io-dev/ debian/python3-siconos/
	find .  \( \( \
		\( -path .\*/.git -o -path .\*/.svn -o -path .\*/.bzr -o -path .\*/.hg -o -path .\*/CVS -o -path .\*/.pc -o -path .\*/_darcs \) -prune -o -type f -a \
	        \( -name '#*#' -o -name '.*~' -o -name '*~' -o -name DEADJOE \
		 -o -name '*.orig' -o -name '*.rej' -o -name '*.bak' \
		 -o -name '.*.orig' -o -name .*.rej -o -name '.SUMS' \
		 -o -name TAGS -o \( -path '*/.deps/*' -a -name '*.P' \) \

[... snipped ...]


        nslaw = sk.NewtonImpactNSL(e)
        nslaw_d = sk.NewtonImpactNSL(e)

        relation = sk.LagrangianLinearTIR(H)
        relation_d = sk.LagrangianLinearTIR(H)

        inter = sk.Interaction(nslaw, relation)
        inter_d = sk.Interaction(nslaw_d, relation_d)

        #
        # NSDS
        #
        bouncing_ball = sk.NonSmoothDynamicalSystem(t0, T)

        bouncing_ball_d = sk.NonSmoothDynamicalSystem(t0, T)

        # add the dynamical system to the non smooth dynamical system
        bouncing_ball.insertDynamicalSystem(ball)
        bouncing_ball_d.insertDynamicalSystem(ball_d)

        # link the interaction and the dynamical system
        bouncing_ball.link(inter, ball)
        bouncing_ball_d.link(inter_d, ball_d)

        #
        # Simulation
        #

        # (1) OneStepIntegrators
        OSI = sk.MoreauJeanOSI(theta)

        OSI_d = sk.MoreauJeanOSI(theta)

        # (2) Time discretisation --
        t = sk.TimeDiscretisation(t0, h)
        t_d = sk.TimeDiscretisation(t0, h)

        # (3) one step non smooth problem
        osnspb = sk.LCP()

        osnspb_d = sk.LCP()

        # (4) Simulation setup with (1) (2) (3)
        s = sk.TimeStepping(bouncing_ball,t, OSI, osnspb)

        s_d = sk.TimeStepping(bouncing_ball_d,t_d, OSI_d, osnspb_d)

        # end of model definition

        #
        # computation
        #

        # the number of time steps
        nb_time_steps = int((T - t0) / h + 1)

        # Get the values to be plotted
        # ->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]
test_bouncing_ball.py:240: ValueError
----------------------------- Captured stdout call -----------------------------
computing FExt at t= 0
computing FExt at t= 0.0
computing FExt at t= 0.005
computing FExt at t= 0.005
computing FExt at t= 0.005

test_bouncing_ball.py:438:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

ball = <siconos.kernel.LagrangianLinearTIDS; proxy of <Swig Object of type 'std::shared_ptr< LagrangianLinearTIDS > *' at 0x7f4def19b130> >
ball_d = <siconos.tests.test_bouncing_ball.Ball; proxy of <Swig Object of type 'std::shared_ptr< LagrangianLinearTIDS > *' at 0x7f4dee61c3f0> >
t0 = 0

    def run_simulation_with_two_ds(ball, ball_d, t0):

        T = 5        # end time
        h = 0.005    # time step

        e = 0.9      # restitution coeficient
        theta = 0.5  # theta scheme

        # ball-floor
        H = np.zeros((1, 3), dtype=np.float64)
        H[0, 0] = 1.

        nslaw = sk.NewtonImpactNSL(e)
        nslaw_d = sk.NewtonImpactNSL(e)

        relation = sk.LagrangianLinearTIR(H)
        relation_d = sk.LagrangianLinearTIR(H)

        inter = sk.Interaction(nslaw, relation)
        inter_d = sk.Interaction(nslaw_d, relation_d)

        #
        # NSDS
        #
        bouncing_ball = sk.NonSmoothDynamicalSystem(t0, T)

        bouncing_ball_d = sk.NonSmoothDynamicalSystem(t0, T)

        # add the dynamical system to the non smooth dynamical system
        bouncing_ball.insertDynamicalSystem(ball)
        bouncing_ball_d.insertDynamicalSystem(ball_d)

        # link the interaction and the dynamical system
        bouncing_ball.link(inter, ball)
        bouncing_ball_d.link(inter_d, ball_d)

        #
        # Simulation
        #

        # (1) OneStepIntegrators
        OSI = sk.MoreauJeanOSI(theta)

        OSI_d = sk.MoreauJeanOSI(theta)

        # (2) Time discretisation --
        t = sk.TimeDiscretisation(t0, h)
        t_d = sk.TimeDiscretisation(t0, h)

        # (3) one step non smooth problem
        osnspb = sk.LCP()

        osnspb_d = sk.LCP()

        # (4) Simulation setup with (1) (2) (3)
        s = sk.TimeStepping(bouncing_ball,t, OSI, osnspb)

        s_d = sk.TimeStepping(bouncing_ball_d,t_d, OSI_d, osnspb_d)

        # end of model definition

        #
        # computation
        #

        # the number of time steps
        nb_time_steps = int((T - t0) / h + 1)

        # Get the values to be plotted
        # ->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]
test_bouncing_ball.py:240: ValueError
----------------------------- Captured stdout call -----------------------------
computing FExt at t= 0
=========================== short test summary info ============================
FAILED test_bouncing_ball.py::test_bouncing_ball2 - ValueError: setting an ar...
FAILED test_bouncing_ball.py::test_bouncing_ball3 - ValueError: setting an ar...
FAILED test_bouncing_ball.py::test_bouncing_ball4 - ValueError: setting an ar...
========================= 3 failed, 1 passed in 0.12s ==========================

      Start 79: python_test_diode_bridge
79/93 Test #79: python_test_diode_bridge ....................   Passed    0.32 sec
      Start 80: python_test_dynamical_systems
80/93 Test #80: python_test_dynamical_systems ...............   Passed    0.30 sec
      Start 81: python_test_lagrangiands_osi
81/93 Test #81: python_test_lagrangiands_osi ................   Passed    0.57 sec
      Start 82: python_test_matrix_exp
82/93 Test #82: python_test_matrix_exp ......................   Passed    0.41 sec
      Start 83: python_test_modelingTools
83/93 Test #83: python_test_modelingTools ...................   Passed    0.27 sec
      Start 84: PIDTest
84/93 Test #84: PIDTest .....................................   Passed    0.03 sec
      Start 85: SMCTest
85/93 Test #85: SMCTest .....................................   Passed    0.09 sec
      Start 86: ObserverTest
86/93 Test #86: ObserverTest ................................   Passed    0.09 sec
      Start 87: TwistingTest
87/93 Test #87: TwistingTest ................................   Passed    0.05 sec
      Start 88: python_test_smc
88/93 Test #88: python_test_smc .............................   Passed    0.42 sec
      Start 89: MultiBodyTest
89/93 Test #89: MultiBodyTest ...............................   Passed    0.02 sec
      Start 90: Contact2dTest
90/93 Test #90: Contact2dTest ...............................   Passed    0.03 sec
      Start 91: BasicTest
91/93 Test #91: BasicTest ...................................   Passed    0.00 sec
      Start 92: KernelTest
92/93 Test #92: KernelTest ..................................   Passed    0.05 sec
      Start 93: python_test_serialization
93/93 Test #93: python_test_serialization ...................   Passed    0.33 sec

99% tests passed, 1 tests failed out of 93

Total Test time (real) =   7.07 sec

The following tests FAILED:
	 78 - python_test_bouncing_ball (Failed)
Errors while running CTest
make[2]: *** [Makefile:74: test] Error 8
make[2]: Leaving directory '/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu'
	rm -fr -- /tmp/dh-xdg-rundir-P5BuZA9_
dh_auto_test: error: cd obj-x86_64-linux-gnu && make -j1 test ARGS\+=--verbose ARGS\+=-j1 ARGS="-E 'COLLECTION|collection|python_test_lcp|dr_iso1|ContactTest'" returned exit code 2
make[1]: *** [debian/rules:92: override_dh_auto_test] Error 25
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:54: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

#1136873#10
Date:
2026-06-29 10:32:06 UTC
From:
To:
Dear Maintainer,

I am writing to confirm that we are experiencing this exact same issue over
in Ubuntu during the mechanics-tools autopkgtests and local builds.

To help get this resolved, I have put together the necessary interim
patches for both the `numpy.in1d` deprecation and the stricter
dimensionality enforcement in NumPy 2.4.

As a quick note on the upstream context: there is no need to forward these
patches upstream. They are currently working on a major architectural
change (currently on rc1) that entirely removes the directories and files
associated with these bugs. However, since those upstream changes will take
time to land, these simple interim patches are necessary for Debian/Ubuntu
to restore the builds and pass the test suites.

Here are the combined patches fixing the `siconos_filter` and
`test_bouncing_ball.py` scripts:
--- a/io/swig/io/filter.py +++ b/io/swig/io/filter.py @@ -115,7 +115,7 @@ time_idx = self.time_idx # Time-filter all but static objects elif path != 'data/static': - time_idx = np.in1d(obj[:,0], self.times).nonzero()[0] + time_idx = np.isin(obj[:,0], self.times).nonzero()[0] # Additionally remove any lines referencing excluded objects if self.excluded_objects is not None:
--- 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 These patches have been uploaded to Ubuntu already: https://code.launchpad.net/~vmpyr/ubuntu/+source/siconos/+git/siconos/+merge/507309 Hope this helps speed up the fix! Thanks, vmpyr