Re: [Numpy-discussion] SphinxDocString class in new numpy doc framework

2008-06-29 Thread Stéfan van der Walt
Hi Matt The docstring for ``np.swapaxes`` is broken -- notice the indent after the first line. If you remove that, things should be fine: In [31]: d = np.swapaxes.__doc__ In [32]: d = d.split('\n') In [33]: d[0] = 'Return a view of an array a with axis1 and axis2 interchanged.' In [34]:

Re: [Numpy-discussion] SphinxDocString class in new numpy doc framework

2008-06-29 Thread Pierre GM
Matt, David Huard and myself have also been working on that. So far, we have a set of directives (numpyxxx, where xxx is function, attribute, method...) that satisfy the numpy standard and can be processed by sphinx. We also have the equivalent autodirectives. https://code.launchpad.net/~david-

Re: [Numpy-discussion] trace not in linalg namespace

2008-06-29 Thread Robert Kern
On Mon, Jun 30, 2008 at 00:23, Alan G Isaac <[EMAIL PROTECTED]> wrote: > I just reached for trace in the numpy.linalg namespace > instead of the numpy namespace, once again, and it made me > wonder: is the current location most natural? I don't think that changing it improves matters significantly

[Numpy-discussion] trace not in linalg namespace

2008-06-29 Thread Alan G Isaac
I just reached for trace in the numpy.linalg namespace instead of the numpy namespace, once again, and it made me wonder: is the current location most natural? Related: is it surprising not to find it where I expected? Cheers, Alan Isaac ___ Numpy

Re: [Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Saket
Everything's working now. I just messed up the rows and columns. Thanks a lot, guys. On Sun, Jun 29, 2008 at 10:35 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > On Sun, Jun 29, 2008 at 21:14, Saket <[EMAIL PROTECTED]> wrote: >> Also, I'm getting different numbers when I do the above using eig(A)

Re: [Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Robert Kern
On Sun, Jun 29, 2008 at 21:14, Saket <[EMAIL PROTECTED]> wrote: > Also, I'm getting different numbers when I do the above using eig(A) > and eigh(A). I thought eigh would be faster, but would still give the > same results... What different numbers? Remember, as Chuck pointed out, you have a multip

Re: [Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Robert Kern
On Sun, Jun 29, 2008 at 21:00, Saket <[EMAIL PROTECTED]> wrote: > Hmm... so the relationship Ax = Lx should hold for every eigenvalue > and corresponding eigenvector of A, right? But, consider the first > eigenvalue,eigenvector pair: > >for i,eval in enumerate(d): >print abs(numpy.dot(A

[Numpy-discussion] SphinxDocString class in new numpy doc framework

2008-06-29 Thread Matt Knox
I guess this question is mostly for Stefan... but I am trying to port the scikits.timeseries module wiki documentation into a sphinx framework, and also trying to follow the numpy doc string standards (which can't be parsed directly by sphinx), so I'm trying to use the SphinxDocString class in doc

Re: [Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Saket
Also, I'm getting different numbers when I do the above using eig(A) and eigh(A). I thought eigh would be faster, but would still give the same results... On Sun, Jun 29, 2008 at 10:00 PM, Saket <[EMAIL PROTECTED]> wrote: > Hmm... so the relationship Ax = Lx should hold for every eigenvalue > and

Re: [Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Saket
Hmm... so the relationship Ax = Lx should hold for every eigenvalue and corresponding eigenvector of A, right? But, consider the first eigenvalue,eigenvector pair: for i,eval in enumerate(d): print abs(numpy.dot(A,v[i]) - numpy.dot(eval,v[i])).max() return Outputs: 1.928 I th

Re: [Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Charles R Harris
On Sun, Jun 29, 2008 at 6:47 PM, Saket <[EMAIL PROTECTED]> wrote: > Hi, > > I'm having this weird problem when computing eigenvalues/vectors with > Numpy. I have the following symmetric matrix, B: > > -0.34620.65380.5385 -0.46150.6538 -0.3462 -0.3462 > -0.3462 >0.6538 -0.

Re: [Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Charles R Harris
On Sun, Jun 29, 2008 at 6:47 PM, Saket <[EMAIL PROTECTED]> wrote: > Hi, > > I'm having this weird problem when computing eigenvalues/vectors with > Numpy. I have the following symmetric matrix, B: > > -0.34620.65380.5385 -0.46150.6538 -0.3462 -0.3462 > -0.3462 >0.6538 -0.

Re: [Numpy-discussion] copying in nanXXX

2008-06-29 Thread Charles R Harris
On Sun, Jun 29, 2008 at 6:24 PM, Damian Eads <[EMAIL PROTECTED]> wrote: > Hi there, > > I'm using nansum for some code and noticed it does a bit of copying. > Specifically, the nanxxx functions copy the input array, create an isnan > boolean mask, set the nan values to make them insignificant (nan

[Numpy-discussion] Eigenvectors in Matlab vs. Numpy

2008-06-29 Thread Saket
Hi, I'm having this weird problem when computing eigenvalues/vectors with Numpy. I have the following symmetric matrix, B: -0.34620.65380.5385 -0.46150.6538 -0.3462 -0.3462 -0.3462 0.6538 -0.34620.5385 -0.46150.6538 -0.3462 -0.3462 -0.3462 0.5385

Re: [Numpy-discussion] Record arrays

2008-06-29 Thread Christopher Hanley
Perry Greenfield wrote: > Hi Chris, > > Didn't we remove all dependence on recarray? I could have sworn we > did that. > > Perry > Perry, You are right. We no longer import the recarray module from numpy. Chris -- Christopher Hanley Systems Software Engineer Space Telescope Science Ins

[Numpy-discussion] copying in nanXXX

2008-06-29 Thread Damian Eads
Hi there, I'm using nansum for some code and noticed it does a bit of copying. Specifically, the nanxxx functions copy the input array, create an isnan boolean mask, set the nan values to make them insignificant (nansum: 0, nanmin: inf, or nanmax: -inf), and then call xxx to compute the statist

Re: [Numpy-discussion] Record arrays

2008-06-29 Thread Perry Greenfield
Hi Chris, Didn't we remove all dependence on recarray? I could have sworn we did that. Perry On Jun 26, 2008, at 12:45 PM, Christopher Hanley wrote: > Travis E. Oliphant wrote: >> Stéfan van der Walt wrote: >>> Hi all, >>> >>> I am documenting `recarray`, and have a question: >>> >>> Is its u

[Numpy-discussion] Should we fix Ticket #709?

2008-06-29 Thread Charles R Harris
That's Ticket #709 : > I'm faily sure that: > numpy.isnan(datetime.datetime.now() > ...should just return False and not raise an exception. > rationale: anything that is not nan should just return False, not raise > TypeErrors?