Skip to content

Commit c30e7eb

Browse files
Fix NumPy 2.4 incompatibility (#1404)
* TST: Test against NumPy 2.4 * Try fix
1 parent 2b8024a commit c30e7eb

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
if: ${{ matrix.ambertools == false }}
8585
run: |
8686
micromamba remove ambertools parmed
87-
micromamba install "packmol >=20.15.0" "lammps>=2024" "numpy>=2.3"
87+
micromamba install "packmol >=20.15.0" "lammps>=2024" "numpy>=2.4"
8888
8989
- name: Install OpenFF NAGL
9090
if: ${{ matrix.nagl == true }}

openff/interchange/components/potentials.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""Models for storing applied force field parameters."""
22

3+
from __future__ import annotations
4+
35
import ast
46
import json
57
from typing import TYPE_CHECKING, Annotated, Any, TypeAlias
@@ -346,7 +348,7 @@ def parametrize(
346348
self,
347349
p=None,
348350
use_jax: bool = True,
349-
) -> ArrayLike | "Array":
351+
) -> ArrayLike | Array:
350352
"""Return an array of system parameters, given an array of force field parameters."""
351353
if p is None:
352354
p = self.get_force_field_parameters(use_jax=use_jax)
@@ -363,7 +365,7 @@ def parametrize_partial(self):
363365
)
364366

365367
@requires_package("jax")
366-
def get_param_matrix(self) -> ArrayLike | "Array":
368+
def get_param_matrix(self) -> ArrayLike | Array:
367369
"""Get a matrix representing the mapping between force field and system parameters."""
368370
from functools import partial
369371

0 commit comments

Comments
 (0)