[Numpy-discussion] possible bug in recordarray assigning to a '4u4' field

Sebastian Haase haase at msg.ucsf.edu
Wed Jan 17 12:02:28 CST 2007


Hi,
ProStr = N.rec.array(None,
                             formats="u4,f4,u4,u4,4u4",
                             names=('count','clock','InitDio',
                                    'nDigital', 'nAnalog'),
                             aligned=True, shape=1)
        ProStr[0] ['nAnalog']  = 1

I get this error message:

ValueError: shape-mismatch on array construction

ProStr ['nAnalog']  = 1
works fine.

Surprisingly
ProStr['nAnalog']  = [1,2,3,4]
works.

Could someone explain ?
Thanks,
Sebastian


More information about the Numpy-discussion mailing list