spark-instrumented-optimizer/python/pyspark/mllib/linalg
zero323 d8399b600c [SPARK-17587][PYTHON][MLLIB] SparseVector __getitem__ should follow __getitem__ contract
## What changes were proposed in this pull request?

Replaces` ValueError` with `IndexError` when index passed to `ml` / `mllib` `SparseVector.__getitem__` is out of range. This ensures correct iteration behavior.

Replaces `ValueError` with `IndexError` for `DenseMatrix` and `SparkMatrix` in `ml` / `mllib`.

## How was this patch tested?

PySpark `ml` / `mllib` unit tests. Additional unit tests to prove that the problem has been resolved.

Author: zero323 <zero323@users.noreply.github.com>

Closes #15144 from zero323/SPARK-17587.
2016-10-03 17:57:54 -07:00
..
__init__.py [SPARK-17587][PYTHON][MLLIB] SparseVector __getitem__ should follow __getitem__ contract 2016-10-03 17:57:54 -07:00
distributed.py [SPARK-14812][ML][MLLIB][PYTHON] Experimental, DeveloperApi annotation audit for ML 2016-07-13 12:33:39 -07:00