# Numpy 2.0 arrives with breaking changes

**URL:** <https://discourse.slicer.org/t/numpy-2-0-arrives-with-breaking-changes/31732>\
**Category:** Development\
**Tags:** python\
**Created:** [September 15, 2023, 8:39am UTC](https://discourse.slicer.org/t/numpy-2-0-arrives-with-breaking-changes/31732 "2023-09-15T08:39:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Vergara](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/alex_vergara/32/15205_2.png) [@Alex\_Vergara](https://discourse.slicer.org/u/Alex_Vergara)\
**Post date:** [September 15, 2023, 8:39am UTC](https://discourse.slicer.org/t/numpy-2-0-arrives-with-breaking-changes/31732/1 "2023-09-15T08:39:09Z")

</div>

The numpy team has issued **[this statement](https://github.com/numpy/numpy/issues/24300)**

Basically you shall temporarily add requirements to pinned numpy\<2 version, then create a CI based on numpy2 and correct all relevant errors before migrating.

If you already have a pinned numpy version in Slicer builds, then you have no issues until next release, but users must be warned not to upgrade numpy in any way. Therefore, you shall block numpy upgrades in the pip\_install function.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 15, 2023, 7:05pm UTC](https://discourse.slicer.org/t/numpy-2-0-arrives-with-breaking-changes/31732/2 "2023-09-15T19:05:31Z")

</div>

Since an issue has been created for this topic, I would suggest to continue discussion there:

> <https://github.com/Slicer/Slicer/issues/7230>
>
> \## Is your feature request related to a problem? Please describe.
> 
> The numpy t…eam has issued \[this statement\](https://github.com/numpy/numpy/issues/24300)
> 
> \## Describe the solution you'd like
> 
> Basically you shall temporarily add requirements to pinned numpy\<2 version, then create a CI based on numpy2 and correct all relevant errors before migrating.
> 
> If you already have a pinned numpy version in Slicer builds, then you have no issues until next release, but users must be warned not to upgrade numpy in any way. Therefore, you shall block numpy upgrades in the pip\_install function.
> 
> \## Describe alternatives you've considered
> 
> When numpy 2 is out, every user upgrading numpy will see Slicer crashing. You shall emit a WARNING.
> 
> \## Additional context
> 
> Future Slicer releases shall be compatible with numpy 2 API
