You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2024/10/20 07:55:50 UTC

Re: [PR] [SPARK-50042][PYTHON] Upgrade numpy 2 for python linter [spark]

zhengruifeng commented on code in PR #48565:
URL: https://github.com/apache/spark/pull/48565#discussion_r1807717708


##########
python/pyspark/ml/linalg/__init__.py:
##########
@@ -706,12 +706,12 @@ def dot(self, other: Iterable[float]) -> np.float64:
 
         elif isinstance(other, SparseVector):
             # Find out common indices.
-            self_cmind = np.in1d(self.indices, other.indices, assume_unique=True)

Review Comment:
   to fix:
   ```
   starting mypy annotations test...
   annotations failed mypy checks:
   python/pyspark/ml/linalg/__init__.py:709: error: Module has no attribute "in1d"  [attr-defined]
   python/pyspark/ml/linalg/__init__.py:714: error: Module has no attribute "in1d"  [attr-defined]
   python/pyspark/mllib/linalg/__init__.py:816: error: Module has no attribute "in1d"  [attr-defined]
   python/pyspark/mllib/linalg/__init__.py:821: error: Module has no attribute "in1d"  [attr-defined]
   Found 4 errors in 2 files (checked 1044 source files)
   1
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org