Re: [Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-10 Thread Pauli Virtanen
Thu, 10 Mar 2011 15:23:59 +0800, Ralf Gommers wrote: [clip] x = np.array([1.5]) x.view(int) array([4609434218613702656]) Yes, `view` is meant to do exactly that. Use `astype` if you want a type cast. Pauli ___ NumPy-Discussion mailing

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-10 Thread Russell E. Owen
In article AANLkTinuGy=aof-s-lzxbguu+sikvzxctxzrccc4n...@mail.gmail.com, Skipper Seabold jsseab...@gmail.com wrote: The page http://docs.scipy.org/doc/numpy/user/basics.rec.html gives a good introduction to structured arrays. However, it says nothing about how to set a particular element

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-09 Thread Skipper Seabold
On Tue, Mar 8, 2011 at 8:08 PM, Skipper Seabold jsseab...@gmail.com wrote: On Sun, Mar 6, 2011 at 11:12 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sun, Mar 6, 2011 at 1:10 AM, Skipper Seabold jsseab...@gmail.com wrote: On Sat, Mar 5, 2011 at 9:28 AM, Ralf Gommers

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-09 Thread Ralf Gommers
On Wed, Mar 9, 2011 at 11:24 PM, Skipper Seabold jsseab...@gmail.com wrote: On Tue, Mar 8, 2011 at 8:08 PM, Skipper Seabold jsseab...@gmail.com wrote: On Sun, Mar 6, 2011 at 11:12 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sun, Mar 6, 2011 at 1:10 AM, Skipper Seabold

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-09 Thread Skipper Seabold
On Wed, Mar 9, 2011 at 8:13 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Wed, Mar 9, 2011 at 11:24 PM, Skipper Seabold jsseab...@gmail.com wrote: On Tue, Mar 8, 2011 at 8:08 PM, Skipper Seabold jsseab...@gmail.com wrote: On Sun, Mar 6, 2011 at 11:12 PM, Ralf Gommers

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-09 Thread Ralf Gommers
On Thu, Mar 10, 2011 at 9:37 AM, Skipper Seabold jsseab...@gmail.com wrote: On Wed, Mar 9, 2011 at 8:13 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Wed, Mar 9, 2011 at 11:24 PM, Skipper Seabold jsseab...@gmail.com wrote: I filed #1758. You can also assign with an array which

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-08 Thread Skipper Seabold
On Sun, Mar 6, 2011 at 11:12 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sun, Mar 6, 2011 at 1:10 AM, Skipper Seabold jsseab...@gmail.com wrote: On Sat, Mar 5, 2011 at 9:28 AM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sat, Mar 5, 2011 at 8:09 AM, Russell E. Owen

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-06 Thread Ralf Gommers
On Sun, Mar 6, 2011 at 1:10 AM, Skipper Seabold jsseab...@gmail.com wrote: On Sat, Mar 5, 2011 at 9:28 AM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sat, Mar 5, 2011 at 8:09 AM, Russell E. Owen ro...@uw.edu wrote: The page http://docs.scipy.org/doc/numpy/user/basics.rec.html gives a

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-05 Thread Ralf Gommers
On Sat, Mar 5, 2011 at 8:09 AM, Russell E. Owen ro...@uw.edu wrote: The page http://docs.scipy.org/doc/numpy/user/basics.rec.html gives a good introduction to structured arrays. However, it says nothing about how to set a particular element (all fields at once) from a collection of data.

Re: [Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-05 Thread Skipper Seabold
On Sat, Mar 5, 2011 at 9:28 AM, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Sat, Mar 5, 2011 at 8:09 AM, Russell E. Owen ro...@uw.edu wrote: The page http://docs.scipy.org/doc/numpy/user/basics.rec.html gives a good introduction to structured arrays. However, it says nothing about how

[Numpy-discussion] Request for a bit more info on structured arrays in the basics page

2011-03-04 Thread Russell E. Owen
The page http://docs.scipy.org/doc/numpy/user/basics.rec.html gives a good introduction to structured arrays. However, it says nothing about how to set a particular element (all fields at once) from a collection of data. For instance: stArr = numpy.zeros([4,5], dtype=[(pos, float, (2,)),