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

   ### What changes were proposed in this pull request?
   
   Implements `np.frexp` for pandas-on-Spark with native Spark expressions, 
replacing its `NotImplemented` placeholder. It reuses the two-output ufunc 
support added for `np.modf` (SPARK-58790), so `mantissa, exponent = 
np.frexp(psser)` works on Series, Index and DataFrame.
   
   ### Why are the changes needed?
   
   `np.frexp` on a pandas-on-Spark object raises today where pandas returns a 
`(mantissa, exponent)` pair — `np.frexp(ps.Series([6.0]))` fails, while pandas 
gives `(0.75, 3)`. It is one of the last two unconverted entries under 
SPARK-58532.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. `np.frexp` on a pandas-on-Spark Series, Index or DataFrame returns a 
`(mantissa, exponent)` tuple instead of raising.
   
   ### How was this patch tested?
   
   New `test_np_frexp` in `NumPyCompatTestsMixin` (classic and Connect parity), 
which fails without the change; the outputs were also checked bit-exact against 
NumPy with a probe covering every power of two ±1 ulp and both ends of the 
double range.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 5)
   


-- 
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