bearomorphism opened a new pull request, #59396:
URL: https://github.com/apache/spark/pull/59396

   ### What changes were proposed in this pull request?
   
   Declare callable types for `maximum`, `minimum`, and `sqrt` in 
`StatCounter.__init__`, then remove the three assignment type ignores on the 
standard-library fallbacks.
   
   ### Why are the changes needed?
   
   The initial NumPy imports infer NumPy-specific callable types. Explicit 
scalar callable signatures describe both the NumPy implementations and their 
`max`, `min`, and `math.sqrt` fallbacks without suppressions.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. Function selection and statistical calculations are unchanged.
   
   ### How was this patch tested?
   
   - Existing `pyspark.tests.test_statcounter` suite passed.
   - Local probes produced identical baseline/modified results with NumPy and 
with its import forced to fail, including empty input, merging, self-merging, 
copying, and statistics output.
   - Mypy on `python/pyspark/statcounter.py`, Ruff lint/format checks, and `git 
diff --check` passed.
   
   No new tests were added; validation used the existing suite and local 
equivalence probes.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: pi 1.1.0
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to