astropy / astropy/reproject

Testing errors in test_reproject_parallel_broadcasting with reproject 1.5.0 and python 3.14/numpy 2.3.2

Open
#552 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
127
Forks
74
Avg merge
1d 11h
Merged PRs (30d)
2

Description

Hello, I'm seeing some errors in pytest when building reproject 1.5.0 inside the Fedora build system.

The errors appear due to a missing string: 'Broadcasting is being used'
Could if be due to a change in numpy?

```
============================= test session starts ==============================
platform linux -- Python 3.14.0rc2, pytest-8.3.5, pluggy-1.6.0

Running tests with reproject version 0.15.0.
Running tests in reproject.

Date: 2025-09-09T10:23:08

Platform: Linux-6.15.9-101.fc41.x86_64-x86_64-with-glibc2.42.9000

Executable: /usr/bin/python3

Full Python Version:
3.14.0rc2 (main, Aug 14 2025, 00:00:00) [GCC 15.2.1 20250808 (Red Hat 15.2.1-1)]

encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15

Package versions:
Numpy: 2.3.2
Scipy: 1.15.3
Astropy: 7.1.0
astropy-healpix: 1.1.2
Cython: 3.1.3

Using Astropy options: remote_data: none.

=================================== FAILURES ===================================
__________________ test_reproject_parallel_broadcasting[None] __________________

caplog = <_pytest.logging.LogCaptureFixture object at 0x7fea71172120>
dask_method = None

def test_reproject_parallel_broadcasting(caplog, dask_method):

# Unit test for reprojecting using parallelization along broadcasted
# dimensions

array_in = np.ones((350, 250, 150))
wcs_in = WCS(naxis=2)
wcs_out = WCS(naxis=2)

# By default if we give a block size that is only in the WCS dimensions,
# the data has a single chunk in the broadcasted dimensions

array1 = reproject_interp(
(array_in, wcs_in),
wcs_out,
shape_out=(300, 300),
parallel=1,
return_footprint=False,
block_size=(100, 100),
return_type="dask",
dask_method=dask_method,
)

assert array1.chunksize == (350, 100, 100)

> assert "Broadcasting is being used" in caplog.text
E AssertionError: assert 'Broadcasting is being used' in ''
E + where '' = <_pytest.logging.LogCaptureFixture object at 0x7fea71172120>.text

reproject/interpolation/tests/test_core.py:1024: AssertionError
_________________ test_reproject_parallel_broadcasting[memmap] _________________

caplog = <_pytest.logging.LogCaptureFixture object at 0x7fea64fb4f50>
dask_method = 'memmap'

def test_reproject_parallel_broadcasting(caplog, dask_method):

# Unit test for reprojecting using parallelization along broadcasted
# dimensions

array_in = np.ones((350, 250, 150))
wcs_in = WCS(naxis=2)
wcs_out = WCS(naxis=2)

# By default if we give a block size that is only in the WCS dimensions,
# the data has a single chunk in the broadcasted dimensions

array1 = reproject_interp(
(array_in, wcs_in),
wcs_out,
shape_out=(300, 300),
parallel=1,
return_footprint=False,
block_size=(100, 100),
return_type="dask",
dask_method=dask_method,
)

assert array1.chunksize == (350, 100, 100)

> assert "Broadcasting is being used" in caplog.text
E AssertionError: assert 'Broadcasting is being used' in ''
E + where '' = <_pytest.logging.LogCaptureFixture object at 0x7fea64fb4f50>.text

reproject/interpolation/tests/test_core.py:1024: AssertionError
__________________ test_reproject_parallel_broadcasting[none] __________________

caplog = <_pytest.logging.LogCaptureFixture object at 0x7fea64fb5a90>
dask_method = 'none'

def test_reproject_parallel_broadcasting(caplog, dask_method):

# Unit test for reprojecting using parallelization along broadcasted
# dimensions

array_in = np.ones((350, 250, 150))
wcs_in = WCS(naxis=2)
wcs_out = WCS(naxis=2)

# By default if we give a block size that is only in the WCS dimensions,
# the data has a single chunk in the broadcasted dimensions

array1 = reproject_interp(
(array_in, wcs_in),
wcs_out,
shape_out=(300, 300),
parallel=1,
return_footprint=False,
block_size=(100, 100),
return_type="dask",
dask_method=dask_method,
)

assert array1.chunksize == (350, 100, 100)

> assert "Broadcasting is being used" in caplog.text
E AssertionError: assert 'Broadcasting is being used' in ''
E + where '' = <_pytest.logging.LogCaptureFixture object at 0x7fea64fb5a90>.text

reproject/interpolation/tests/test_core.py:1024: AssertionError
=========================== short test summary info ============================
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with reproject/interpolation/tests/test_core.py and test_reproject_parallel_broadcasting, then reproduce the failure using the Python 3.14, NumPy 2.3.2, and related package versions shown. Trace why caplog.text lacks “Broadcasting is being used” and determine whether the test or behavior changed. Done means the intended broadcasting behavior is covered and the test suite passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.