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
data leakage with S0 in record dtype (Trac #1992) #2585
>>> x = np.zeros(1, 'S,i')
>>> x['f0']='A'
>>> x
array([('', 65)], dtype=[('f0','|S0'),('f1','<i4')])
In contrast, if the assigned dtype is
'S1,i'
, x is then ('A',0)
So not only is there ambiguity as to what a 'S' dtype produces (as discussed in other tickets), but assignment to that record leaks over to the adjacent field.
I first encountered this in an introduction to numpy for Ironpython, but it occurs in all versions that I've tested.
Activity
BUG: Fix numerous bugs related to zero-width string arrays (numpy#473, …
ahaldane commentedon Jun 2, 2016
Fixed by #6430