Skip to content

KDTree / BallTree seg fault #14650

@drejanko

Description

@drejanko

Both tree structures seg fault on init if the supplied data array has points with different dimensions.

import numpy as np
from sklearn.neighbors import KDTree


X = [(1,2,3), (2,5), (5,5,1,2)]
Y = np.array(X)
KDTree(Y)

Segmentation fault (core dumped)

Pip freeze:

joblib==0.13.2
numpy==1.17.0
scikit-learn==0.21.3
scipy==1.3.1
sklearn==0.0

Metadata

Metadata

Assignees

Labels

BugEasyWell-defined and straightforward way to resolvesegfault

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions