Skip to content
Snippets Groups Projects
Commit 8ac71d62 authored by zero323's avatar zero323 Committed by Joseph K. Bradley
Browse files

[SPARK-11084] [ML] [PYTHON] Check if index can contain non-zero value before binary search

At this moment `SparseVector.__getitem__` executes `np.searchsorted` first and checks if result is in an expected range after that. It is possible to check if index can contain non-zero value before executing `np.searchsorted`.

Author: zero323 <matthew.szymkiewicz@gmail.com>

Closes #9098 from zero323/sparse_vector_getitem_improved.
parent 10046ea7
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment