Skip to content

Fix numpy v2 incompatibility (#536)#565

Open
Chessing234 wants to merge 1 commit into
allenai:mainfrom
Chessing234:fix/numpy-v2-compat
Open

Fix numpy v2 incompatibility (#536)#565
Chessing234 wants to merge 1 commit into
allenai:mainfrom
Chessing234:fix/numpy-v2-compat

Conversation

@Chessing234
Copy link
Copy Markdown

Summary

  • Removes the numpy<2.0 upper bound constraint in pyproject.toml that was causing binary incompatibility errors (numpy.dtype size changed) with numpy v2
  • The constraint was originally added while waiting for spacy and nmslib to support numpy v2; both now do (spacy >=3.7, nmslib >=2.1.2)
  • Sets a minimum of numpy>=1.24.0 to ensure a reasonably modern numpy version

Fixes #536

Test plan

  • Install scispacy with numpy v2 and verify no numpy.dtype size changed errors
  • Run existing test suite to confirm no regressions

🤖 Generated with Claude Code

Removes the numpy<2.0 version constraint that was causing binary
incompatibility errors ("numpy.dtype size changed") when numpy v2
is installed. The constraint was originally added while waiting for
spacy and nmslib to be rebuilt for numpy v2; both now support it.

Fixes allenai#536

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Powerkrieger
Copy link
Copy Markdown

Powerkrieger commented Apr 22, 2026

Not sure if im completely off track with this, but:

  • i built scispacy locally with the removal of numpy constraint
  • that allowed spacy 3.8
  • when trying to run scispacy models of version 0.5.4 i had a "config type mismatch with spacy 3.8's stricter validation"
    • include_static_vectors = "True" should be a bool but is a string

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

Labels

None yet

Projects

None yet

2 participants