Skip to content

numpy 2#2218

Draft
casperdcl wants to merge 19 commits intomasterfrom
numpy-2
Draft

numpy 2#2218
casperdcl wants to merge 19 commits intomasterfrom
numpy-2

Conversation

@casperdcl
Copy link
Copy Markdown
Member

@casperdcl casperdcl commented Sep 30, 2025

unsure about

upstream problems

  • test tomophantom with numpy>=2
  • test tigre with numpy>=2
  • test astra-toolbox=*=cuda* with numpy>=2
  • test_CIL_CVXPy -> cvxpy -> scipy:
test_cil_vs_cvxpy_totalvariation_anisotropic (test_CIL_CVXPy.Test_CIL_vs_CVXPy.test_cil_vs_cvxpy_totalvariation_anisotropic) ... 
...
$CONDA_PREFIX/lib/python3.12/site-packages/scipy/sparse/_dia.py:140: UserWarning: result dtype changed due to the removal of value-based promotion from NumPy. Changed from int64 to int32.
  nnz += min(M+k,N)
...
$CONDA_PREFIX/lib/python3.12/site-packages/cvxpy/utilities/coeff_extractor.py:296: UserWarning: result dtype changed due to the removal of value-based promotion from NumPy. Changed from int32 to int64.
  P.row += offset

@casperdcl casperdcl self-assigned this Sep 30, 2025
@casperdcl casperdcl force-pushed the numpy-2 branch 4 times, most recently from 32b30db to 712e848 Compare October 1, 2025 13:37
@github-project-automation github-project-automation bot moved this to Todo in CIL work Oct 1, 2025
@casperdcl casperdcl added the help wanted Extra attention is needed label Oct 1, 2025
@casperdcl casperdcl moved this from Todo to In Progress in CIL work Oct 1, 2025
@gfardell gfardell requested review from gfardell and paskino October 14, 2025 14:24
@gfardell gfardell moved this from In Progress to Priority review in CIL work Oct 14, 2025
Comment thread README.md Outdated
Comment thread Wrappers/Python/cil/optimisation/algorithms/PD3O.py
Comment thread Wrappers/Python/cil/optimisation/algorithms/SPDHG.py
Comment thread Wrappers/Python/cil/optimisation/functions/Function.py Outdated
Comment thread Wrappers/Python/cil/optimisation/functions/Function.py Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming that all the filters in this file return the same type as the input.

Comment thread Wrappers/Python/test/test_BlockDataContainer.py
Comment thread Wrappers/Python/test/test_functions.py Outdated
Comment thread Wrappers/Python/cil/framework/acquisition_data.py
Comment thread Wrappers/Python/cil/framework/block.py
Comment thread Wrappers/Python/cil/framework/data_container.py
Comment thread Wrappers/Python/cil/io/TIFF.py
Comment thread Wrappers/Python/cil/optimisation/algorithms/PDHG.py
Comment thread Wrappers/Python/cil/optimisation/algorithms/SPDHG.py
Comment thread Wrappers/Python/cil/optimisation/functions/Function.py
Comment thread Wrappers/Python/cil/optimisation/functions/LeastSquares.py Outdated
Comment thread Wrappers/Python/cil/optimisation/functions/LeastSquares.py
@gfardell gfardell moved this from Priority review to Blocked in CIL work Feb 10, 2026
@casperdcl casperdcl force-pushed the numpy-2 branch 2 times, most recently from abf5d9e to 6094e2c Compare February 17, 2026 19:49
@gfardell
Copy link
Copy Markdown
Member

gfardell commented Mar 5, 2026

These tests fail using Tigre's FBP for the usual data type promotion problem.

@unittest.skipUnless(has_tigre and has_nvidia, "Requires TIGRE GPU")
class Test_Parallel3D_FBP_tigre(unittest.TestCase, TestCommon_FBP_SIM):
def setUp(self):
setup_parameters(self)
self.Parallel3D()
self.tolerance_fbp = 1e-3
self.tolerance_fbp_roi = 1e-3
@unittest.skipUnless(has_tigre and has_nvidia, "Requires TIGRE GPU")
class Test_Parallel2D_FBP_tigre(unittest.TestCase, TestCommon_FBP_SIM):
def setUp(self):
setup_parameters(self)
self.Parallel2D()
self.tolerance_fbp = 1e-3
self.tolerance_fbp_roi = 1e-3

I have opened an issue on TIGRE.
CERN/TIGRE#730

We should discuss how to handle it in the mean time, we don't really want CIL to just recast it back and be happy.

@gfardell gfardell modified the milestone: v26.0 Apr 1, 2026
@casperdcl casperdcl mentioned this pull request Apr 14, 2026
8 tasks
@casperdcl
Copy link
Copy Markdown
Member Author

casperdcl commented Apr 17, 2026

fyi @gfardell conda-test fails during build because it can't find tigre=3.1.3 in ccpi (it only exists in https://tomography.stfc.ac.uk/conda/ and ccpi/labels/dev).

@gfardell
Copy link
Copy Markdown
Member

fyi @gfardell conda-test fails during build because it can't find tigre=3.1.3 in ccpi (it only exists in https://tomography.stfc.ac.uk/conda/ and ccpi/labels/dev).

good to know!

I have just got as far as creating the environment locally (linux) from the requirements file (that is using ccpi/label/dev). There's a few failures we need to address.

  • test_DataProcessor.TestSlicer.test_aqdata_full_astra
  • test_io.TestTIFF.test_TIFF_compression3D_1 and _2
  • test_io.TestTIFF.test_TIFF_compression4D_1 and _2
  • test_PluginsTigre_Siddon.Test_Cone3D_Projectors_sim_tigre
  • I think this is a difference from a tigre version bump changing the behaviour of the Siddon forward projector, we might just relax the test tolerance but worth looking at what's changed

Once they are addressed (and checked on windows) I think that is all tests & plugins updated, and this could be merged, so getting close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

Status: Blocked

Development

Successfully merging this pull request may close these issues.

support numpy v2

4 participants