You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0bf907a
Browse filesBrowse the repository at this point in the historyBrowse files
PyArray_NewFromDescr normally does not allow zero-width string dtypes (or rather, it automatically converts them to 1-width strings). This affects any code that uses PyArray_NewFromDescr, which is a lot. So we extend PyArray_NewFromDescr_int to allow disabling this functionality in a couple narrow cases where it's appropriate--one is when extracting a field from a structured array that has a zero-width string dtype (which, intentionally or not, has been allowed). The other, which is related, is returning a view of an array that has a zero-width string dtype. This shouldn't otherwise break or change any existing behavior.
Remove roadblocks to creating structured dtypes with zero-width fields using dict-based constructors (this was possible by other means such as the list-based constructor--with the previous fix in particular it should not be necessary to block this anymore).
Adds tests based on the tests cases given in the issues this is fixing.
Fix a bug with array to zero-width array assignment revealed by the tests. I am slightly concerned that the blunt-force check for this in raw_array_assign_array may be masking a bug somewhere else though.
0 commit comments