Re: [Numpy-discussion] Can't seem to use np.insert() or np.append() for structured arrays

2014-08-30 Thread Sebastian Berg
On Fr, 2014-08-29 at 22:10 -0400, Benjamin Root wrote: Consider the following: a = np.array([(1, 'a'), (2, 'b'), (3, 'c')], dtype=[('foo', 'i'), ('bar', 'a1')]) b = np.append(a, (4, 'd')) Traceback (most recent call last): File stdin, line 1, in module File

Re: [Numpy-discussion] Can't seem to use np.insert() or np.append() for structured arrays

2014-08-30 Thread Sebastian Berg
On Sa, 2014-08-30 at 09:04 +0100, Sebastian Berg wrote: On Fr, 2014-08-29 at 22:10 -0400, Benjamin Root wrote: Consider the following: a = np.array([(1, 'a'), (2, 'b'), (3, 'c')], dtype=[('foo', 'i'), ('bar', 'a1')]) b = np.append(a, (4, 'd')) Traceback (most recent call last):

Re: [Numpy-discussion] Can't seem to use np.insert() or np.append() for structured arrays

2014-08-29 Thread Charles R Harris
On Fri, Aug 29, 2014 at 8:10 PM, Benjamin Root ben.r...@ou.edu wrote: Consider the following: a = np.array([(1, 'a'), (2, 'b'), (3, 'c')], dtype=[('foo', 'i'), ('bar', 'a1')]) b = np.append(a, (4, 'd')) Traceback (most recent call last): File stdin, line 1, in module File