From d494a86d7a7d3470a86980a20d40faf8a3e71165 Mon Sep 17 00:00:00 2001 From: rayair250-droid Date: Thu, 23 Jul 2026 23:36:39 +0200 Subject: [PATCH] Fix removed np.int alias in nstates return annotation np.int was removed in NumPy 1.24, and the project pins numpy<2, so no supported NumPy version defines it. nstates returns len(self.electronic_states), a builtin int, so the annotation was also semantically wrong. It is currently masked only because 'from __future__ import annotations' makes annotations lazy strings, but typing.get_type_hints() on this class would raise AttributeError. This is the only such deprecated alias left in the codebase. --- mlatom/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlatom/data.py b/mlatom/data.py index e110381..7df46cc 100644 --- a/mlatom/data.py +++ b/mlatom/data.py @@ -1322,7 +1322,7 @@ def excitation_energies(self, excitation_energies=None): @property - def nstates(self) -> np.int: + def nstates(self) -> int: ''' The number of electronic states. '''