Kripa21 opened a new pull request, #47681:
URL: https://github.com/apache/arrow/pull/47681

   DOC: clarify that Array.to_numpy() drops timezone for timestamp arrays 
(fixes #45644)
   
   ### Rationale for this change
   
   NumPy's `datetime64` dtype does not preserve timezone metadata.  
   Currently, when converting Arrow timestamp arrays with a timezone (e.g. 
`timestamp[s, tz=UTC]`) via `.to_numpy()`, the timezone information is silently 
dropped.  
   This has caused user confusion (see issue #45644).  
   This PR clarifies this behavior in the documentation and shows a minimal 
example. It also points users to `.to_pandas()` for preserving timezone-aware 
semantics.
   
   ### What changes are included in this PR?
   
   - Added a note in `docs/source/python/numpy.rst` under the "Arrow → NumPy" 
section.  
   - The note explicitly states that `.to_numpy()` returns a timezone-naive 
`datetime64` array.  
   - Added a minimal code example comparing `.to_numpy()` vs `.to_pandas()`.
   
   ### Are these changes tested?
   
   - Not applicable: this is a documentation-only change.  
   - The included code snippet was run locally to confirm correctness.
   
   ### Are there any user-facing changes?
   
   - Yes: clearer documentation of `.to_numpy()` limitations with 
timezone-aware Arrow timestamp arrays.  
   - No API or functional changes.
   
   **This PR includes breaking changes to public APIs.**  
   N/A — documentation only.
   
   **This PR contains a "Critical Fix".**  
   N/A — documentation only.
   


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

Reply via email to