[Numpy-discussion] Creating an ndarray from an iterable over sequences

2014-01-20 Thread Dr. Leo
Hi, I would like to write something like: In [25]: iterable=((i, i**2) for i in range(10)) In [26]: a=np.fromiter(iterable, int32) --- ValueErrorTraceback (most recent call last) in () >

Re: [Numpy-discussion] A one-byte string dtype?

2014-01-20 Thread Charles R Harris
On Mon, Jan 20, 2014 at 3:58 PM, Charles R Harris wrote: > > > > On Mon, Jan 20, 2014 at 3:35 PM, Nathaniel Smith wrote: > >> On Mon, Jan 20, 2014 at 10:28 PM, Charles R Harris >> wrote: >> > >> > >> > >> > On Mon, Jan 20, 2014 at 2:27 PM, Oscar Benjamin < >> oscar.j.benja...@gmail.com> >> > wr

Re: [Numpy-discussion] A one-byte string dtype?

2014-01-20 Thread Charles R Harris
On Mon, Jan 20, 2014 at 3:35 PM, Nathaniel Smith wrote: > On Mon, Jan 20, 2014 at 10:28 PM, Charles R Harris > wrote: > > > > > > > > On Mon, Jan 20, 2014 at 2:27 PM, Oscar Benjamin < > oscar.j.benja...@gmail.com> > > wrote: > >> > >> > >> On Jan 20, 2014 8:35 PM, "Charles R Harris" > >> wrote:

Re: [Numpy-discussion] A one-byte string dtype?

2014-01-20 Thread Nathaniel Smith
On Mon, Jan 20, 2014 at 10:28 PM, Charles R Harris wrote: > > > > On Mon, Jan 20, 2014 at 2:27 PM, Oscar Benjamin > wrote: >> >> >> On Jan 20, 2014 8:35 PM, "Charles R Harris" >> wrote: >> > >> > I think we may want something like PEP 393. The S datatype may be the >> > wrong place to look, we m

Re: [Numpy-discussion] A one-byte string dtype?

2014-01-20 Thread Charles R Harris
On Mon, Jan 20, 2014 at 2:27 PM, Oscar Benjamin wrote: > > On Jan 20, 2014 8:35 PM, "Charles R Harris" > wrote: > > > > I think we may want something like PEP 393. The S datatype may be the > wrong place to look, we might want a modification of U instead so as to > transparently get the benefit o

Re: [Numpy-discussion] A one-byte string dtype?

2014-01-20 Thread Oscar Benjamin
On Jan 20, 2014 8:35 PM, "Charles R Harris" wrote: > > I think we may want something like PEP 393. The S datatype may be the wrong place to look, we might want a modification of U instead so as to transparently get the benefit of python strings. The approach taken in PEP 393 (the FSR) makes more

Re: [Numpy-discussion] A one-byte string dtype?

2014-01-20 Thread Charles R Harris
On Mon, Jan 20, 2014 at 11:40 AM, Oscar Benjamin wrote: > > On Jan 20, 2014 5:21 PM, "Charles R Harris" > wrote: > > On Mon, Jan 20, 2014 at 10:12 AM, Aldcroft, Thomas < > aldcr...@head.cfa.harvard.edu> wrote: > >> On Mon, Jan 20, 2014 at 10:40 AM, Oscar Benjamin < > oscar.j.benja...@gmail.com>

Re: [Numpy-discussion] A one-byte string dtype?

2014-01-20 Thread josef . pktd
On Mon, Jan 20, 2014 at 12:12 PM, Aldcroft, Thomas wrote: > > > > On Mon, Jan 20, 2014 at 10:40 AM, Oscar Benjamin > wrote: >> >> On Mon, Jan 20, 2014 at 10:00:55AM -0500, Aldcroft, Thomas wrote: >> > On Mon, Jan 20, 2014 at 5:11 AM, Oscar Benjamin >> > wrote: >> > > How significant are the perfo

Re: [Numpy-discussion] A one-byte string dtype? (Charles R Harris)

2014-01-20 Thread David Goldsmith
On Mon, Jan 20, 2014 at 9:11 AM, wrote: > I think that is right. Not having an effective way to handle these common > scientific data sets will block acceptance of Python 3. But we do need to > figure out the best way to add this functionality. > > Chuck > Sounds like it might be time for some f

Re: [Numpy-discussion] A one-byte string dtype?

2014-01-20 Thread Oscar Benjamin
On Jan 20, 2014 5:21 PM, "Charles R Harris" wrote: > On Mon, Jan 20, 2014 at 10:12 AM, Aldcroft, Thomas < aldcr...@head.cfa.harvard.edu> wrote: >> On Mon, Jan 20, 2014 at 10:40 AM, Oscar Benjamin < oscar.j.benja...@gmail.com> wrote: >>> On Mon, Jan 20, 2014 at 10:00:55AM -0500, Aldcroft, Thomas wr

Re: [Numpy-discussion] A one-byte string dtype?

2014-01-20 Thread Charles R Harris
On Mon, Jan 20, 2014 at 10:12 AM, Aldcroft, Thomas < aldcr...@head.cfa.harvard.edu> wrote: > > > > On Mon, Jan 20, 2014 at 10:40 AM, Oscar Benjamin < > oscar.j.benja...@gmail.com> wrote: > >> On Mon, Jan 20, 2014 at 10:00:55AM -0500, Aldcroft, Thomas wrote: >> > On Mon, Jan 20, 2014 at 5:11 AM, Os

Re: [Numpy-discussion] A one-byte string dtype?

2014-01-20 Thread Charles R Harris
On Mon, Jan 20, 2014 at 8:00 AM, Aldcroft, Thomas < aldcr...@head.cfa.harvard.edu> wrote: > > > > On Mon, Jan 20, 2014 at 5:11 AM, Oscar Benjamin < > oscar.j.benja...@gmail.com> wrote: > >> On Fri, Jan 17, 2014 at 02:30:19PM -0800, Chris Barker wrote: >> > Folks, >> > >> > I've been blathering awa

Re: [Numpy-discussion] A one-byte string dtype?

2014-01-20 Thread Aldcroft, Thomas
On Mon, Jan 20, 2014 at 10:40 AM, Oscar Benjamin wrote: > On Mon, Jan 20, 2014 at 10:00:55AM -0500, Aldcroft, Thomas wrote: > > On Mon, Jan 20, 2014 at 5:11 AM, Oscar Benjamin > > wrote: > > > How significant are the performance issues? Does anyone really use > numpy > > > for > > > this kind of

Re: [Numpy-discussion] A one-byte string dtype?

2014-01-20 Thread Oscar Benjamin
On Mon, Jan 20, 2014 at 10:00:55AM -0500, Aldcroft, Thomas wrote: > On Mon, Jan 20, 2014 at 5:11 AM, Oscar Benjamin > wrote: > > How significant are the performance issues? Does anyone really use numpy > > for > > this kind of text handling? If you really are operating on gigantic text > > arrays o

Re: [Numpy-discussion] A one-byte string dtype?

2014-01-20 Thread Aldcroft, Thomas
On Mon, Jan 20, 2014 at 5:11 AM, Oscar Benjamin wrote: > On Fri, Jan 17, 2014 at 02:30:19PM -0800, Chris Barker wrote: > > Folks, > > > > I've been blathering away on the related threads a lot -- sorry if it's > too > > much. It's gotten a bit tangled up, so I thought I'd start a new one to > > ad

Re: [Numpy-discussion] A one-byte string dtype?

2014-01-20 Thread Oscar Benjamin
On Fri, Jan 17, 2014 at 02:30:19PM -0800, Chris Barker wrote: > Folks, > > I've been blathering away on the related threads a lot -- sorry if it's too > much. It's gotten a bit tangled up, so I thought I'd start a new one to > address this one question (i.e. dont bring up genfromtext here): > > W