Skip to content

add __init__.py to simple_knn for module initialization#12

Open
tea-lemon-balm wants to merge 1 commit into
camenduru:mainfrom
tea-lemon-balm:fix/simple-knn-packaging
Open

add __init__.py to simple_knn for module initialization#12
tea-lemon-balm wants to merge 1 commit into
camenduru:mainfrom
tea-lemon-balm:fix/simple-knn-packaging

Conversation

@tea-lemon-balm

@tea-lemon-balm tea-lemon-balm commented Apr 2, 2026

Copy link
Copy Markdown

This pull request adds a fallback import mechanism to the simple_knn package, improving its robustness when the compiled extension module is unavailable.

Import handling improvements:

  • Added a try/except block in simple_knn/__init__.py to attempt importing all symbols from the compiled module _C, and gracefully handle the ImportError if the module is not present.

Closes #1

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.

This include 'simple_knn._C' ?

1 participant