Skip to content

Only copy numpy arrays when necessary#500

Merged
Martin Stancsics (stanmart) merged 5 commits into
mainfrom
contiguous_df
Dec 16, 2025
Merged

Only copy numpy arrays when necessary#500
Martin Stancsics (stanmart) merged 5 commits into
mainfrom
contiguous_df

Conversation

@stanmart
Copy link
Copy Markdown
Collaborator

As documented in glum #959, we seem to be making a copy of numpy matrices when constructing a DenseMatrix regardless of its necessity. This PR

Bottom line is we should only copy in the case of dtype changes and non-contiguous inputs.

Checklist

  • Added a CHANGELOG.rst entry

Comment thread CHANGELOG.rst Outdated
=========


Unreleased
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Let's release this.

@stanmart Martin Stancsics (stanmart) merged commit 3c717b7 into main Dec 16, 2025
26 checks passed
@stanmart Martin Stancsics (stanmart) deleted the contiguous_df branch December 16, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants