Re: [Numpy-discussion] how to get info about internals of an array object ?

2006-09-15 Thread Sebastian Haase
On Friday 15 September 2006 12:49, Travis Oliphant wrote: > Sebastian Haase wrote: > >On Friday 15 September 2006 10:00, Travis Oliphant wrote: > >>Sebastian Haase wrote: > >>>Hi, > >>> > >>>what I'm asking is if numpy has an equivalent to numarray's info() > > > >function: > >>na.arange(10).in

Re: [Numpy-discussion] how to get info about internals of an array object ?

2006-09-15 Thread Travis Oliphant
Sebastian Haase wrote: >On Friday 15 September 2006 10:00, Travis Oliphant wrote: > > >>Sebastian Haase wrote: >> >> >>>Hi, >>> >>>what I'm asking is if numpy has an equivalent to numarray's info() >>> >>> >function: > > >>na.arange(10).info() >> >> >>numpy.n

Re: [Numpy-discussion] how to get info about internals of an array object ?

2006-09-15 Thread Sebastian Haase
On Friday 15 September 2006 10:00, Travis Oliphant wrote: > Sebastian Haase wrote: > > Hi, > > > > what I'm asking is if numpy has an equivalent to numarray's info() function: > na.arange(10).info() > > numpy.numarray.info(numpy.arange(10)) > > (get recent SVN as there were some bugs just fix

Re: [Numpy-discussion] Experience with Visit?

2006-09-15 Thread Rob Hetland
I have looked at it, and I even know somebody who is using python to put in a data reader for FVCOM (a finite volume ocean model). He has a prototype working. I have no experience with the python bindings personally. I looked into compiling it from source (for an intel mac), but it was

Re: [Numpy-discussion] buggy buggy bugyy: format and casting ?

2006-09-15 Thread Robert Kern
Eric Emsellem wrote: > Hi, > > I am facing a rather frustrating problem with numpy/scipy: after > upgrading to svn numpy and scipy, and trying to remove most of the now > unnecessary casting (floats) the program I wrote does not give me the > right answer. It seems that the answer is somewhat scal

Re: [Numpy-discussion] PyArray_DescrConverter - alignment / trailingunused bytes

2006-09-15 Thread Martin Wiechert
On Friday 15 September 2006 20:27, Travis Oliphant wrote: > Martin Wiechert wrote: > > On Friday 15 September 2006 19:14, Travis Oliphant wrote: > >> Martin Wiechert wrote: > >>> Thanks Albert! Do you also know the corresponding C-API function? It > >>> cannot be PyArray_DescrConverter (PyObject *,

Re: [Numpy-discussion] PyArray_DescrConverter - alignment / trailingunused bytes

2006-09-15 Thread Travis Oliphant
Martin Wiechert wrote: > On Friday 15 September 2006 19:14, Travis Oliphant wrote: > >> Martin Wiechert wrote: >> >>> Thanks Albert! Do you also know the corresponding C-API function? It >>> cannot be PyArray_DescrConverter (PyObject *, PyArray_Descr **), whose >>> signature has no "align",

Re: [Numpy-discussion] PyArray_DescrConverter - alignment/ trailingunused bytes

2006-09-15 Thread Albert Strasheim
Argh > > > > > One final question. To me the repr of a dtype with gaps is a little bit > > puzzling: > > > > >>> dtype ({'names': ['a', 'b', 'c'], 'formats': [' > 'offsets': [0, 16, 24]}) > > dtype([('a', '|S4'), ('', '|V12'), ('b', ' > ' > > > There should be no gap between "b" and "c" but stil

Re: [Numpy-discussion] PyArray_DescrConverter - alignment / trailingunused bytes

2006-09-15 Thread Albert Strasheim
Hello all > -Original Message- > From: [EMAIL PROTECTED] [mailto:numpy- > [EMAIL PROTECTED] On Behalf Of Martin Wiechert > Sent: 15 September 2006 19:53 > To: Discussion of Numerical Python > Subject: Re: [Numpy-discussion]PyArray_DescrConverter - alignment / > trailingunused bytes > > On

Re: [Numpy-discussion] PyArray_DescrConverter - alignment / trailing unused bytes

2006-09-15 Thread Martin Wiechert
On Friday 15 September 2006 20:05, Travis Oliphant wrote: > Martin Wiechert wrote: > > Hi list, > > > > I'm using PyArray_DescrConverter with a dict object to create a > > "struct-like" dtype from C. > > As the struct contains different data types I run into "unaligned access" > > problems. > > Is

Re: [Numpy-discussion] PyArray_DescrConverter - alignment / trailing unused bytes

2006-09-15 Thread Travis Oliphant
Martin Wiechert wrote: > Hi list, > > I'm using PyArray_DescrConverter with a dict object to create a "struct-like" > dtype from C. > As the struct contains different data types I run into "unaligned access" > problems. > Is there a way to force alignment or to get trailing unused bytes in the >

Re: [Numpy-discussion] PyArray_DescrConverter - alig nment / trailingunused bytes

2006-09-15 Thread Martin Wiechert
On Friday 15 September 2006 19:14, Travis Oliphant wrote: > Martin Wiechert wrote: > > Thanks Albert! Do you also know the corresponding C-API function? It > > cannot be PyArray_DescrConverter (PyObject *, PyArray_Descr **), whose > > signature has no "align", right? > > The DescrConverter function

Re: [Numpy-discussion] PyArray_DescrConverter - alignment / trailingunused bytes

2006-09-15 Thread Travis Oliphant
Martin Wiechert wrote: > Thanks Albert! Do you also know the corresponding C-API function? It cannot > be > PyArray_DescrConverter (PyObject *, PyArray_Descr **), whose signature has no > "align", right? > The DescrConverter function is meant for "O&"-style conversions. It can't accept an a

Re: [Numpy-discussion] how to get info about internals of an array object ?

2006-09-15 Thread Travis Oliphant
Sebastian Haase wrote: > Hi, > what I'm asking is if numpy has an equivalent to numarray's info() function: > na.arange(10).info() numpy.numarray.info(numpy.arange(10)) (get recent SVN as there were some bugs just fixed. -Travis ---

[Numpy-discussion] buggy buggy bugyy: format and casting ?

2006-09-15 Thread Eric Emsellem
Hi, I am facing a rather frustrating problem with numpy/scipy: after upgrading to svn numpy and scipy, and trying to remove most of the now unnecessary casting (floats) the program I wrote does not give me the right answer. It seems that the answer is somewhat scaled down (but not in a simple way)

Re: [Numpy-discussion] how to get info about internals of an arrayobject ?

2006-09-15 Thread Travis Oliphant
Albert Strasheim wrote: >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:numpy- >> [EMAIL PROTECTED] On Behalf Of Sebastian Haase >> Sent: 15 September 2006 03:21 >> To: numpy-discussion >> Subject: [Numpy-discussion] how to get info about internals of an >> arrayobject ? >> >> Hi,

Re: [Numpy-discussion] Experience with Visit?

2006-09-15 Thread O'Keefe, Michael
I haven't tried VisIT before but thanks for the link. I also downloaded and am checking it out. Along this same line of discussion, has anyone tried OOF2 which is an FEA package that also has some strong python connections? http://www.ctcms.nist.gov/oof/oof2.html I'm working on a Windows machi

Re: [Numpy-discussion] PyArray_DescrConverter - alignment / trailingunused bytes

2006-09-15 Thread Martin Wiechert
On Friday 15 September 2006 17:53, Albert Strasheim wrote: > Hello all > > In [1]: import numpy as N > > In [3]: N.dtype({'names' : ['x', 'y'], > 'formats' : [N.intc, N.float64]}, > align=True) > Out[3]: dtype([('x', ' > The reason you might not have discovered this

Re: [Numpy-discussion] PyArray_DescrConverter - alignment / trailingunused bytes

2006-09-15 Thread Albert Strasheim
Hello all In [1]: import numpy as N In [3]: N.dtype({'names' : ['x', 'y'], 'formats' : [N.intc, N.float64]}, align=True) Out[3]: dtype([('x', ' String Form: Namespace: Interactive File: c:\python24\lib\site-packages\numpy\__init__.py Docstring:

Re: [Numpy-discussion] PyArray_DescrConverter - alignment / trailing unused bytes

2006-09-15 Thread Martin Wiechert
On Friday 15 September 2006 16:40, Francesc Altet wrote: > A Divendres 15 Setembre 2006 16:13, Martin Wiechert va escriure: > > Hi list, > > > > I'm using PyArray_DescrConverter with a dict object to create a > > "struct-like" dtype from C. > > As the struct contains different data types I run int

Re: [Numpy-discussion] PyArray_DescrConverter - alignment / trailing unused bytes

2006-09-15 Thread Francesc Altet
A Divendres 15 Setembre 2006 16:13, Martin Wiechert va escriure: > Hi list, > > I'm using PyArray_DescrConverter with a dict object to create a > "struct-like" dtype from C. > As the struct contains different data types I run into "unaligned access" > problems. > Is there a way to force alignment o

Re: [Numpy-discussion] Experience with Visit?

2006-09-15 Thread Robert Cimrman
Travis Oliphant wrote: > Has anybody had any experience with the 3-D visualization software > VISIT? It has Python bindings and seems to be pretty sophisticated. > I'm wondering why I haven't heard more about it. > > http://www.llnl.gov/visit/ No reaction up to now, so... I have just tried

Re: [Numpy-discussion] PyArray_DescrConverter - alignment / trailing unused bytes

2006-09-15 Thread Martin Wiechert
On Friday 15 September 2006 16:13, Martin Wiechert wrote: > Hi list, > > I'm using PyArray_DescrConverter with a dict object to create a > "struct-like" dtype from C. > As the struct contains different data types I run into "unaligned access" > problems. on IA64 I should have mentioned > Is there

[Numpy-discussion] PyArray_DescrConverter - alignment / trailing unused bytes

2006-09-15 Thread Martin Wiechert
Hi list, I'm using PyArray_DescrConverter with a dict object to create a "struct-like" dtype from C. As the struct contains different data types I run into "unaligned access" problems. Is there a way to force alignment or to get trailing unused bytes in the dtpye? Thanks, Martin -

Re: [Numpy-discussion] recarray

2006-09-15 Thread Francesc Altet
A Divendres 15 Setembre 2006 15:57, Robert Kern va escriure: > Lionel Roubeyrie wrote: > > Hi all, > > I try to use recarray with rec.fromrecords on time-series, datas come > > from a file where they are stored in csv format, with after each data > > colum there is one column meanning the state of

Re: [Numpy-discussion] recarray

2006-09-15 Thread Robert Kern
Lionel Roubeyrie wrote: > Hi all, > I try to use recarray with rec.fromrecords on time-series, datas come from a > file where they are stored in csv format, with after each data colum there is > one column meanning the state of the data, and the first column is for dates. > Then, is it possible t

Re: [Numpy-discussion] degree matrix construction

2006-09-15 Thread Charles R Harris
On 9/15/06, Satya Upadhya <[EMAIL PROTECTED]> wrote: Dear Friends,my question is the following:Suppose i have the following code:>>> from LinearAlgebra import *>>> from Numeric import *>>> A = [1,2,1,3,1,3,4,1,2] >>> B = reshape(A,(3,3))>>> C = sum(B,1)>>> Carray([4, 7, 7])>>> Now, my problem is to

Re: [Numpy-discussion] degree matrix construction

2006-09-15 Thread Joris De Ridder
Forgot the link to the NEL: http://www.scipy.org/Numpy_Example_List J. Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm - Using Tomcat but need to do more? Need to support web services, security? Get stuff don

Re: [Numpy-discussion] degree matrix construction

2006-09-15 Thread Joris De Ridder
Hi, [SU]: Now, my problem is to construct a degree matrix D which is a 3 * 3 matrix with diagonal elements 4,7,7 You might have a look at the Numpy Example List, at the function diag(). Ciao, Joris Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

[Numpy-discussion] degree matrix construction

2006-09-15 Thread Satya Upadhya
Dear Friends,my question is the following:Suppose i have the following code:>>> from LinearAlgebra import *>>> from Numeric import *>>> A = [1,2,1,3,1,3,4,1,2]>>> B = reshape(A,(3,3))>>> C = sum(B,1)>>> Carray([4, 7, 7])>>> Now, my problem is to construct a degree matrix D which is a 3 * 3 matrix w

[Numpy-discussion] recarray

2006-09-15 Thread Lionel Roubeyrie
Hi all, I try to use recarray with rec.fromrecords on time-series, datas come from a file where they are stored in csv format, with after each data colum there is one column meanning the state of the data, and the first column is for dates. Then, is it possible to directly transform column of str

Re: [Numpy-discussion] how to get info about internals of an arrayobject ?

2006-09-15 Thread Albert Strasheim
> -Original Message- > From: [EMAIL PROTECTED] [mailto:numpy- > [EMAIL PROTECTED] On Behalf Of Sebastian Haase > Sent: 15 September 2006 03:21 > To: numpy-discussion > Subject: [Numpy-discussion] how to get info about internals of an > arrayobject ? > > Hi, > what I'm asking is if numpy ha