NumPy ≥ 2.4.0 incompatibility when importing PyNeb

12 views
Skip to first unread message

José Eduardo Méndez Delgado

unread,
Feb 12, 2026, 4:15:05 PM (7 days ago) Feb 12
to PyNeb

Dear PyNeb community,

I would like to report a compatibility issue involving PyNeb, Astropy, and NumPy ≥ 2.4.0. This issue was identified by my student, Alondra Vega, while setting up a fresh environment.

With NumPy 2.4.0 (released December 2025), the function numpy.in1d has been removed. When attempting to import PyNeb:

import pyneb as pn

the import fails with the following error:

AttributeError: module 'numpy' has no attribute 'in1d'


The traceback indicates that the issue does not originate directly within PyNeb itself, but occurs during the import chain. 

It may be worth considering one of the following:

  • Adding an upper bound on NumPy (e.g., <2.4) in the PyNeb requirements,

  • Ensuring compatibility with more recent Astropy versions,

  • Or conditionally importing WCS only when required.

We hope this report is helpful. 

Regards,
Eduardo

Christophe Morisset

unread,
Feb 14, 2026, 8:49:41 AM (6 days ago) Feb 14
to PyNeb
Hi Eduardo,
I created a new python environment with numpy=2.4.0, and had no problem in installing and importing PyNeb. Could you give more details as: which version of pyneb do you have installed? What is the full error message?
Thanks a lot,
Christophe

José Eduardo Méndez Delgado

unread,
Feb 14, 2026, 11:34:21 PM (5 days ago) Feb 14
to PyNeb
Dear all,

It seems that the issue is related to Astropy. I apologize for the confusion caused.

Eduardo
Reply all
Reply to author
Forward
0 new messages