Skip to content

Conversation

@OmarManzoor
Copy link
Contributor

@OmarManzoor OmarManzoor commented Mar 7, 2023

Reference Issues/PRs

Towards #25484
Towards #24875

What does this implement/fix? Explain your changes.

  • Replace cnp.ndarray with const memory views in _cd_fast.
  • Remove the -Wcpp warning when compiling _cd_fast.

Any other comments?

CC: @thomasjpfan @jjerphan

@OmarManzoor OmarManzoor changed the title MAINT Replaces cnp.ndarray with memory views in _cd_fast and remove -… MAINT Replaces cnp.ndarray with memory views in _cd_fast Mar 7, 2023
Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @OmarManzoor.

Here are a few comments. I think this LGTM, I am just wondering if we can make the code more natural without having casts.

Copy link
Member

@jeremiedbb jeremiedbb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @OmarManzoor

@jeremiedbb
Copy link
Member

you probably can remove the cnp.import_array() at the top of the file now

@jjerphan
Copy link
Member

jjerphan commented Mar 9, 2023

Following discussions in #25780 (review), can you reintroduce the call to cnp.import_array.

@jjerphan jjerphan enabled auto-merge (squash) March 9, 2023 08:01
@jjerphan jjerphan merged commit 63ff303 into scikit-learn:main Mar 9, 2023
@OmarManzoor OmarManzoor deleted the cython_cd_fast branch March 9, 2023 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants