Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt authored Sep 23, 2024
1 parent abebd0f commit da0807f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/npyffi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ fn get_numpy_api<'py>(
Ok(api)
}

fn is_numpy_2<'py>(py: Python<'py>) -> bool {
/// Returns whether the runtime `numpy` version is 2.0 or greater.
pub fn is_numpy_2<'py>(py: Python<'py>) -> bool {
let api_version = *API_VERSION.get_or_init(py, || unsafe {
PY_ARRAY_API.PyArray_GetNDArrayCFeatureVersion(py)
});
Expand Down

0 comments on commit da0807f

Please sign in to comment.