Skip to content

Conversation

@pnikutta
Copy link
Contributor

When running with two points as input for fit_predict, the bin indices are not computed correctly, leading to

munmap_chunk(): invalid pointer

To reproduce, run the test from this PR or

int main(){
    Dbscan model{0.5, 2};
    auto label_vector = model.fit_predict({{0.f, 0.f}, {1.f, 1.f}});
}

The fix checks and adjusts the bin indices accordingly.

@pnikutta pnikutta force-pushed the fix/two-points-edge-case-invalid-pointer branch from 7b4296e to 75b6d49 Compare July 24, 2025 14:31
@ahans ahans merged commit 4dd27d3 into ahans:main Jul 24, 2025
2 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.

2 participants