spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mengxr <>
Subject [GitHub] spark pull request: [SPARK-2909] [Mlib] [PySpark] SparseVector in ...
Date Tue, 13 Jan 2015 20:42:32 GMT
Github user mengxr commented on a diff in the pull request:
    --- Diff: python/pyspark/mllib/ ---
    @@ -510,6 +510,22 @@ def __eq__(self, other):
                     and np.array_equal(other.indices, self.indices)
                     and np.array_equal(other.values, self.values))
    +    def __getitem__(self, item):
    +        inds = self.indices
    +        vals = self.values
    +        if not isinstance(item, int):
    +            raise ValueError("Indices must be of type integer")
    --- End diff --
    Include `type(item)` in the error message.

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message