Skip to content

Conversation

@mroeschke
Copy link
Member

AFAICT these copies are not necessary or related to whats being tested

@mroeschke mroeschke added Testing pandas testing functions or related to the test suite Clean labels Jan 5, 2024
@mroeschke mroeschke added this to the 3.0 milestone Jan 6, 2024
arr = np.random.default_rng(2).standard_normal(10)
arr = arr.astype(dtype.lower(), copy=False)

ser = Series(arr.copy(), dtype=dtype)
Copy link
Member

Choose a reason for hiding this comment

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

This could be dangerous

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure sounds good. Added copy=True to the constructor

@phofl phofl merged commit b293fac into pandas-dev:main Jan 8, 2024
@phofl
Copy link
Member

phofl commented Jan 8, 2024

thx @mroeschke

@mroeschke mroeschke deleted the cln/test/copy branch January 8, 2024 23:46
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Clean Testing pandas testing functions or related to the test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants