Source: flox
Version: 0.11.2-1
Severity: serious
User: [email protected]
Usertags: numpy2.4

Hi Maintainer

The autopkgtests of flox fail when tested with NumPy 2.4 [1].  I've
copied what I hope is the relevant part of the log below.

Regards
Graham


[1] https://ci.debian.net/packages/f/flox/testing/amd64/


493s =================================== FAILURES
===================================
493s _________________ test_cohorts_nd_by[flox-blockwise-None-mode]
_________________
493s TypeError: only 0-dimensional arrays can be converted to Python scalars
493s
493s The above exception was the direct cause of the following exception:
493s ../../build.55d/src/tests/test_core.py:1211: in test_cohorts_nd_by
493s     expected, sorted_groups = groupby_reduce(array.compute(), by, **kwargs)
493s                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
493s ../../build.55d/src/flox/core.py:1076: in groupby_reduce
493s     results = _reduce_blockwise(
493s ../../build.55d/src/flox/core.py:502: in _reduce_blockwise
493s     results = chunk_reduce(
493s ../../build.55d/src/flox/core.py:368: in chunk_reduce
493s     result = generic_aggregate(
493s ../../build.55d/src/flox/aggregations.py:124: in generic_aggregate
493s     result = method(
493s ../../build.55d/src/flox/aggregate_npg.py:195: in mode
493s     return npg.aggregate_numpy.aggregate(
493s /usr/lib/python3/dist-packages/numpy_groupies/aggregate_numpy.py:381:
in aggregate
493s     return _aggregate_base(
493s /usr/lib/python3/dist-packages/numpy_groupies/aggregate_numpy.py:331:
in _aggregate_base
493s     ret = _impl_dict.get("generic", _generic_callable)(
493s /usr/lib/python3/dist-packages/numpy_groupies/aggregate_numpy.py:240:
in _generic_callable
493s     ret[i] = func(grp)
493s     ^^^^^^
493s E   ValueError: setting an array element with a sequence.
493s _______________ test_cohorts_nd_by[flox-blockwise-None-nanmode]
________________
493s TypeError: only 0-dimensional arrays can be converted to Python scalars
493s
493s The above exception was the direct cause of the following exception:
493s ../../build.55d/src/tests/test_core.py:1211: in test_cohorts_nd_by
493s     expected, sorted_groups = groupby_reduce(array.compute(), by, **kwargs)
493s                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
493s ../../build.55d/src/flox/core.py:1076: in groupby_reduce
493s     results = _reduce_blockwise(
493s ../../build.55d/src/flox/core.py:502: in _reduce_blockwise
493s     results = chunk_reduce(
493s ../../build.55d/src/flox/core.py:368: in chunk_reduce
493s     result = generic_aggregate(
493s ../../build.55d/src/flox/aggregations.py:124: in generic_aggregate
493s     result = method(
493s ../../build.55d/src/flox/aggregate_npg.py:207: in nanmode
493s     return npg.aggregate_numpy.aggregate(
493s /usr/lib/python3/dist-packages/numpy_groupies/aggregate_numpy.py:381:
in aggregate
493s     return _aggregate_base(
493s /usr/lib/python3/dist-packages/numpy_groupies/aggregate_numpy.py:331:
in _aggregate_base
493s     ret = _impl_dict.get("generic", _generic_callable)(
493s /usr/lib/python3/dist-packages/numpy_groupies/aggregate_numpy.py:240:
in _generic_callable
493s     ret[i] = func(grp)
493s     ^^^^^^
493s E   ValueError: setting an array element with a sequence.
493s ________________________ test_dtype[flox-float32-mode]
_________________________
493s TypeError: only 0-dimensional arrays can be converted to Python scalars
493s
493s The above exception was the direct cause of the following exception:
493s ../../build.55d/src/tests/test_core.py:1564: in test_dtype
493s     actual, _ = groupby_reduce(
493s ../../build.55d/src/flox/core.py:1076: in groupby_reduce
493s     results = _reduce_blockwise(
493s ../../build.55d/src/flox/core.py:502: in _reduce_blockwise
493s     results = chunk_reduce(
493s ../../build.55d/src/flox/core.py:368: in chunk_reduce
493s     result = generic_aggregate(
493s ../../build.55d/src/flox/aggregations.py:124: in generic_aggregate
493s     result = method(
493s ../../build.55d/src/flox/aggregate_npg.py:195: in mode
493s     return npg.aggregate_numpy.aggregate(
493s /usr/lib/python3/dist-packages/numpy_groupies/aggregate_numpy.py:381:
in aggregate
493s     return _aggregate_base(
493s /usr/lib/python3/dist-packages/numpy_groupies/aggregate_numpy.py:331:
in _aggregate_base
493s     ret = _impl_dict.get("generic", _generic_callable)(
493s /usr/lib/python3/dist-packages/numpy_groupies/aggregate_numpy.py:240:
in _generic_callable
493s     ret[i] = func(grp)
493s     ^^^^^^
493s E   ValueError: setting an array element with a sequence.

Reply via email to