Skip to content

fix: remove dead numpy.char.array import triggering chararray deprecation - #98

Merged
petercorke merged 3 commits into
mainfrom
fix/remove-dead-numpy-chararray-import
Aug 16, 2026
Merged

fix: remove dead numpy.char.array import triggering chararray deprecation#98
petercorke merged 3 commits into
mainfrom
fix/remove-dead-numpy-chararray-import

Conversation

@petercorke

Copy link
Copy Markdown
Owner

Summary

  • from numpy.char import array at Sources.py:28 was unused -- confirmed via grep -n "[^.]\barray(" src/machinevisiontoolbox/Sources.py, which returns zero hits. Every real array(...) call in the file is np.array(...) (a different function) or a local variable that happens to be named array.
  • The import served no purpose and only existed to trigger numpy's "The chararray class is deprecated" DeprecationWarning on every import of the package -- visible throughout the test suite's warning summary.

Fix

Delete the unused import. No behavior change.

Test plan

  • Confirmed the warning no longer fires on import machinevisiontoolbox.Sources (captured via warnings.catch_warnings).
  • Full test suite: 1001 passed, 15 skipped, no regressions.

🤖 Generated with Claude Code

…tion

from numpy.char import array at Sources.py:28 was unused -- every actual
array( call in the file is np.array(...) (a different function) or a local
variable that happens to be named array. The import served no purpose and
only existed to trigger numpy's "chararray class is deprecated" warning on
every import of the package, seen throughout the test suite.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@petercorke
petercorke merged commit 299bad6 into main Aug 16, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant