Skip to content

Fix: Replace deprecated np.unicode_ with np.str_ for NumPy 2.0 compatibility #1598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: mainline
Choose a base branch
from

Conversation

HamedDaneshvar
Copy link

Summary

This PR fixes an issue where np.unicode_ was removed in NumPy 2.0, causing an AttributeError.
The fix replaces np.unicode_ with np.str_, which is the recommended alternative.

Changes

  • Replaced np.unicode_ with np.str_ in the String class.

Testing

  • Ran pytest to ensure all tests pass.

@HamedDaneshvar HamedDaneshvar marked this pull request as draft March 29, 2025 12:13
@HamedDaneshvar HamedDaneshvar marked this pull request as ready for review March 29, 2025 12:15
Copy link
Contributor

This PR is stale. Remove stale label or it will be closed next week.

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

Successfully merging this pull request may close these issues.

1 participant