Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/14555#discussion_r74208842 --- Diff: python/pyspark/ml/linalg/__init__.py --- @@ -511,6 +519,12 @@ def __init__(self, size, *args): "Indices %s and %s are not strictly increasing" % (self.indices[i], self.indices[i + 1])) + assert np.max(self.indices) < self.size, \ --- End diff -- Will this disallow a size 0 vector? not sure what np.max does here. PS I like its error message better for "not strictly increasing" and we should probably make the messages generally consistent.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org