This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 858574213d9a Revert "[SPARK-54922][PYTHON] Remove ignore[arg-type] for 
np.set_prin…
858574213d9a is described below

commit 858574213d9a90d0b29771bb6c7d0931536e5c87
Author: Tian Gao <[email protected]>
AuthorDate: Thu Jan 8 11:08:27 2026 +0900

    Revert "[SPARK-54922][PYTHON] Remove ignore[arg-type] for np.set_prin…
    
    …toptions"
    
    This reverts commit 3dc641b4a384818d400c727fa4381b15cd3155a6.
    
    ### What changes were proposed in this pull request?
    
    Revert 3dc641b4a384818d400c727fa4381b15cd3155a6
    
    ### Why are the changes needed?
    
    The original commit broke CI when numpy version is low.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No
    
    ### How was this patch tested?
    
    Revert
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No
    
    Closes #53723 from gaogaotiantian/revert-numpy.
    
    Authored-by: Tian Gao <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 python/pyspark/core/rdd.py            | 2 +-
 python/pyspark/pandas/indexes/base.py | 2 +-
 python/pyspark/pandas/indexing.py     | 2 +-
 python/pyspark/pandas/namespace.py    | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/python/pyspark/core/rdd.py b/python/pyspark/core/rdd.py
index 303450c08d27..243b8a8fe913 100644
--- a/python/pyspark/core/rdd.py
+++ b/python/pyspark/core/rdd.py
@@ -5382,7 +5382,7 @@ def _test() -> None:
 
         if Version(np.__version__) >= Version("2"):
             # `legacy="1.25"` only available in `nump>=2`
-            np.set_printoptions(legacy="1.25")
+            np.set_printoptions(legacy="1.25")  # type: ignore[arg-type]
     except (ModuleNotFoundError, TypeError):
         pass
 
diff --git a/python/pyspark/pandas/indexes/base.py 
b/python/pyspark/pandas/indexes/base.py
index 67061e28b322..17cb3bf3f74a 100644
--- a/python/pyspark/pandas/indexes/base.py
+++ b/python/pyspark/pandas/indexes/base.py
@@ -2658,7 +2658,7 @@ def _test() -> None:
         # Numpy 2.0+ changed its string format,
         # adding type information to numeric scalars.
         # `legacy="1.25"` only available in `nump>=2`
-        np.set_printoptions(legacy="1.25")
+        np.set_printoptions(legacy="1.25")  # type: ignore[arg-type]
 
     globs = pyspark.pandas.indexes.base.__dict__.copy()
     globs["ps"] = pyspark.pandas
diff --git a/python/pyspark/pandas/indexing.py 
b/python/pyspark/pandas/indexing.py
index f60e8d66b903..d1ab273ef4f5 100644
--- a/python/pyspark/pandas/indexing.py
+++ b/python/pyspark/pandas/indexing.py
@@ -1850,7 +1850,7 @@ def _test() -> None:
         # Numpy 2.0+ changed its string format,
         # adding type information to numeric scalars.
         # `legacy="1.25"` only available in `nump>=2`
-        np.set_printoptions(legacy="1.25")
+        np.set_printoptions(legacy="1.25")  # type: ignore[arg-type]
 
     globs = pyspark.pandas.indexing.__dict__.copy()
     globs["ps"] = pyspark.pandas
diff --git a/python/pyspark/pandas/namespace.py 
b/python/pyspark/pandas/namespace.py
index 11dc31d3e504..a5f2b5ee4f6a 100644
--- a/python/pyspark/pandas/namespace.py
+++ b/python/pyspark/pandas/namespace.py
@@ -3886,7 +3886,7 @@ def _test() -> None:
         # Numpy 2.0+ changed its string format,
         # adding type information to numeric scalars.
         # `legacy="1.25"` only available in `nump>=2`
-        np.set_printoptions(legacy="1.25")
+        np.set_printoptions(legacy="1.25")  # type: ignore[arg-type]
 
     globs = pyspark.pandas.namespace.__dict__.copy()
     globs["ps"] = pyspark.pandas


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to