Skip to content

Add a test for data truncation when creating array from sequence of mixed numeric and string values #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

thouis
Copy link
Contributor

@thouis thouis commented Dec 5, 2011

This commit adds a not-yet-resolved regression test for bug #1990. test_regression.py seemed like the most likely test suite to put the test into, as the bug was not present 1.5.1 (see post on numpy-discussion from Pierre Haesig)/.

The test is written such that either of the following fixes would cause the test to pass:

  • mixed strings & numerics produce a dtype=object array.
  • numerics are used to calculate the required string length during array creation.

(for some reason, github won't let me specify the maintenance/1.6.x branch by name. I've filed it against the current 1.6.x hash.)

@rgommers
Copy link
Member

rgommers commented Mar 4, 2012

Thanks for the test, it has been added in master in 91f87e1. A bit sloppy that your name wasn't preserved as the author, apologies for that.

It's best to always send a PR against master by the way. Nothing should be committed to maintenance branches directly, only backported.

@rgommers rgommers closed this Mar 4, 2012
@bryevdv
Copy link

bryevdv commented Mar 6, 2012

thouis, that was my fault that your name was left off. I did put in one of my branch commits, but all that got lost when the commits were squashed. I am new-ish to git, Ralf has shown me how to cherry pick so I won't make the same mistake in the future. Thanks for the test, and my apologies for not getting your name in correctly.

luyahan pushed a commit to plctlab/numpy that referenced this pull request Apr 25, 2024
feat: Add vshr[q]_n_[s8|s16|s32|s64|u8|u16|u32|u64]
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.

3 participants