Re: [Numpy-discussion] mercurial now has free hosting too

2008-03-26 Thread David Cournapeau
Ondrej Certik wrote: Hi, since there was so much discussion whether bzr or hg, Mercurial has now free hosting too: http://freehg.org/ also Mercurial 1.0 was finally released yesterday. That's really good news. Bzr has Launchpad, that's one of the (main) reasons ipython is

Re: [Numpy-discussion] [IPython-dev] mercurial now has free hosting too

2008-03-26 Thread Gael Varoquaux
On Wed, Mar 26, 2008 at 11:36:18AM +0200, Ville M. Vainio wrote: I think the killer issue here is Launchpad. We get pretty much everything for free, and it's something that we can expect to stay around in the long haul (and will continue to improve). The slight performance disadvantage of bzr

Re: [Numpy-discussion] [IPython-dev] mercurial now has free hosting too

2008-03-26 Thread David Cournapeau
Gael Varoquaux wrote: I have watch developpers switch to DVCS lately, and I must say it requires a certain change in working habits. Let us wait for people to get used to these new tools before discussing which one to you. I personally think that the supposed difficulty of DVCS is greatly

Re: [Numpy-discussion] [IPython-dev] mercurial now has free hosting too

2008-03-26 Thread Gael Varoquaux
On Wed, Mar 26, 2008 at 07:08:31PM +0900, David Cournapeau wrote: Gael Varoquaux wrote: I have watch developpers switch to DVCS lately, and I must say it requires a certain change in working habits. Let us wait for people to get used to these new tools before discussing which one to you.

Re: [Numpy-discussion] [IPython-dev] mercurial now has free hosting too

2008-03-26 Thread David Cournapeau
Gael Varoquaux wrote: Look, I am not talking about theory, I was not talking about theory: - svn co url - bzr co url - svn commit -m bla bla - bzr ci -m bla bla - svn up - bzr up - svn log - bzr log - svn blame - bzr blame You cannot be more concrete than that :) I agree

Re: [Numpy-discussion] [IPython-dev] mercurial now has free hosting too

2008-03-26 Thread Gael Varoquaux
On Wed, Mar 26, 2008 at 07:26:13PM +0900, David Cournapeau wrote: Gael Varoquaux wrote: Look, I am not talking about theory, I was not talking about theory: - svn co url - bzr co url - svn commit -m bla bla - bzr ci -m bla bla - svn up - bzr up - svn log - bzr log -

Re: [Numpy-discussion] [IPython-dev] mercurial now has free hosting too

2008-03-26 Thread Matthieu Brucher
2008/3/26, David Cournapeau [EMAIL PROTECTED]: Gael Varoquaux wrote: Except that very often when you do a bzr up you have to do a merge because bzr makes obvious branching that is implicit with the svn model. bzr does not branch implicitly, as far as I know, so I am not sure to

[Numpy-discussion] Quikest way to create a diagonal matrix ?

2008-03-26 Thread Pierre GM
All, What's the quickest way to create a diagonal matrix ? I already have the elements above the main diagonal. Of course, I could use loops: m=5 z = numpy.arange(m*m).reshape(m,m) for k in range(m): for j in range(k+1,m): z[j,k] = z[k,j] But I was looking for something more

Re: [Numpy-discussion] Quikest way to create a diagonal matrix ?

2008-03-26 Thread Matthieu Brucher
Hi, Did you try diag() ? Or are you saying a symmetric matrix ? Matthieu 2008/3/26, Pierre GM [EMAIL PROTECTED]: All, What's the quickest way to create a diagonal matrix ? I already have the elements above the main diagonal. Of course, I could use loops: m=5 z =

Re: [Numpy-discussion] Quikest way to create a symetric (diagonal???) matrix ?

2008-03-26 Thread Alexandre Fayolle
On Wed, Mar 26, 2008 at 09:48:02AM -0400, Pierre GM wrote: All, What's the quickest way to create a diagonal matrix ? I already have the elements above the main diagonal. Of course, I could use loops: m=5 z = numpy.arange(m*m).reshape(m,m) for k in range(m): for j in range(k+1,m):

Re: [Numpy-discussion] Quikest way to create a diagonal matrix ?

2008-03-26 Thread lorenzo bolla
numpy.tri In [31]: T = numpy.tri(m) In [32]: z.T * T + z * T.T Out[32]: array([[ 0., 1., 2., 3., 4.], [ 1., 12., 7., 8., 9.], [ 2., 7., 24., 13., 14.], [ 3., 8., 13., 36., 19.], [ 4., 9., 14., 19., 48.]]) hth, L. On Wed, Mar 26,

Re: [Numpy-discussion] Quikest way to create a diagonal matrix ?

2008-03-26 Thread Joris De Ridder
On 26 Mar 2008, at 15:36, lorenzo bolla wrote: numpy.tri In [31]: T = numpy.tri(m) In [32]: z.T * T + z * T.T Out[32]: array([[ 0., 1., 2., 3., 4.], [ 1., 12., 7., 8., 9.], [ 2., 7., 24., 13., 14.], [ 3., 8., 13., 36., 19.], [

[Numpy-discussion] ANN: SfePy 00.41.03

2008-03-26 Thread Robert Cimrman
Greetings, I'm pleased to announce the release 00.41.03 of SfePy (formerly SFE) SfePy is a finite element analysis software in Python, based primarily on Numpy and SciPy. Mailing lists, issue tracking, mercurial repository: http://code.google.com/p/sfepy/ Home page: http://sfepy.kme.zcu.cz

Re: [Numpy-discussion] Quikest way to create a diagonal matrix ?

2008-03-26 Thread lorenzo bolla
I like obfuscating things! Maybe I should switch to perl :-) you can use a one-liner like this: scipy.linalg.triu(z) + scipy.linalg.triu(z,k=1).T my %timeit gives roughly the same execution speed as your f(z): In [79]: %timeit f(z) 1 loops, best of 3: 79.3 us per loop In [80]: %timeit h(z)

Re: [Numpy-discussion] ANN: SfePy 00.41.03

2008-03-26 Thread Christopher Barker
Robert Cimrman wrote: I'm pleased to announce the release 00.41.03 of SfePy (formerly SFE) very cool! Totally off-topic, but how did you build that nifty pdf slide show? (introduction_slide.pdf) -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/ORR

Re: [Numpy-discussion] Quikest way to create a symetric (diagonal???) matrix ?

2008-03-26 Thread Hoyt Koepke
If the rest of the matrix is already zeros and memory wasn't a problem, you could just use A_sym = A + A.T - diag(diag(A)) If memory was an issue, I'd suggest weave.inline (if that's a viable option) or pyrex to do the loop, which would be about as fast as you could get. --Hoyt On Wed, Mar

[Numpy-discussion] missing function in numpy.ma?

2008-03-26 Thread Charles Doutriaux
Hello, I used to be able to inherit form nump.oldnumeric.ma.array, it looks like you can't any longer. I replaced it with: numpy.ma.MaskedArray i'm getting: result = result.reorder(order).regrid(grid) AttributeError: 'MaskedArray' object has no attribute 'reorder' Should I inherit from

Re: [Numpy-discussion] bug with with fill_values in masked arrays?

2008-03-26 Thread Chris Withers
Matt Knox wrote: data = [1., 2., 3., np.nan, 5., 6.] mask = [0, 0, 0, 1, 0, 0] I'm creating the ma with ma.masked_where... marr = ma.array(data, mask=mask) marr.set_fill_value(55) print marr[0] is ma.masked # False print marr[3] # ma.masked constant Yeah, and this is where I have the

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-26 Thread Jarrod Millman
On Fri, Mar 21, 2008 at 9:32 AM, Stéfan van der Walt [EMAIL PROTECTED] wrote: Not exactly. What do people think of the way I organized the numpy functions by category page? Apart from the sore-thumb other category, it does seem like the kind of grouping we might hope for. I can see

Re: [Numpy-discussion] bug with with fill_values in masked arrays?

2008-03-26 Thread Chris Withers
Pierre GM wrote: My bad, I neglected an overall doc for the functions and their docstring. But you know what ? As you're now at an intermediary level, That's pretty unkind to your userbase. I know a lot about python, but I'm a total novice with numpy and even the maths it's based on. help:

Re: [Numpy-discussion] Quikest way to create a symetri c (diagonal???) matrix ?

2008-03-26 Thread Pierre GM
All, Yes, I was talking about symmetric matrices. Sorry for the confusion. Thanks a lot for your answers. The slices approach looks the best indeed. I was hoping that there was some way to use smart indexing, but it really looks like too complicated. Thx again P. P.

Re: [Numpy-discussion] missing function in numpy.ma?

2008-03-26 Thread Pierre GM
Charles, result = result.reorder(order).regrid(grid) AttributeError: 'MaskedArray' object has no attribute 'reorder' Should I inherit from soemtihng else ? Mmh, .reorder is not a regular ndarray method, so that won't work. What is it supposed to do ? And regrid ? Aslo I used to import a

Re: [Numpy-discussion] missing function in numpy.ma?

2008-03-26 Thread Charles Doutriaux
The reorder is a function we implement. By digging a bit into this my guess is that all the missing function in numpy.ma are causing to fail at some point in our init and returning the wrong object type. But the whole idea was to keep a backward compatible layer with Numeric and MA. It worked

Re: [Numpy-discussion] bug with with fill_values in masked arrays?

2008-03-26 Thread Pierre GM
On Wednesday 26 March 2008 15:42:41 Chris Withers wrote: Pierre GM wrote: My bad, I neglected an overall doc for the functions and their docstring. But you know what ? As you're now at an intermediary level, That's pretty unkind to your userbase. I know a lot about python, but I'm a total

Re: [Numpy-discussion] missing function in numpy.ma?

2008-03-26 Thread Eric Firing
Charles Doutriaux wrote: The reorder is a function we implement. By digging a bit into this my guess is that all the missing function in numpy.ma are causing to fail at some point in our init and returning the wrong object type. But the whole idea was to keep a backward compatible layer

Re: [Numpy-discussion] missing function in numpy.ma?

2008-03-26 Thread Pierre GM
Charles, numpy.ma is supposed to replace numpy.core.ma only. I don't know what happened to numpy.oldnumeric.ma, more exactly when it was dropped. A quick search on the trac indicates it happens a while ago (before version 1.0.1)... In short, the major difference between the old (numpy.core.ma)

[Numpy-discussion] f2py functions, docstrings, and epydoc

2008-03-26 Thread Tom Loredo
Hi folks- Can anyone offer any tips on how I can get epydoc to produce API documentation for functions in an f2py-produced module? Currently they get listed in the generated docs as Variables: Variables psigc = fortran object at 0xa3e46b0 sigctp = fortran object at 0xa3e4698

[Numpy-discussion] accumarray

2008-03-26 Thread Gabriel J.L. Beckers
Does numpy have something like Matlab's accumarray? http://www.mathworks.com/access/helpdesk/help/techdoc/ref/accumarray.html Best, Gabriel ___ Numpy-discussion mailing list Numpy-discussion@scipy.org

Re: [Numpy-discussion] accumarray

2008-03-26 Thread Robert Kern
On Wed, Mar 26, 2008 at 5:20 PM, Gabriel J.L. Beckers [EMAIL PROTECTED] wrote: Does numpy have something like Matlab's accumarray? http://www.mathworks.com/access/helpdesk/help/techdoc/ref/accumarray.html No. -- Robert Kern I have come to believe that the whole world is an enigma, a

[Numpy-discussion] vander() docstring

2008-03-26 Thread Andreas Klöckner
Hi all, The docstring for vander() seems to contradict what the function does. In particular, the columns in the vander() output seem reversed wrt its docstring. I feel like one of the two needs to be fixed, or is there something I'm not seeing? This here is fresh from the Numpy examples

Re: [Numpy-discussion] vander() docstring

2008-03-26 Thread Charles R Harris
On Wed, Mar 26, 2008 at 5:22 PM, Andreas Klöckner [EMAIL PROTECTED] wrote: Hi all, The docstring for vander() seems to contradict what the function does. In particular, the columns in the vander() output seem reversed wrt its docstring. I feel like one of the two needs to be fixed, or is

Re: [Numpy-discussion] accumarray

2008-03-26 Thread Alan G Isaac
On Wed, Mar 26, 2008 at 5:20 PM, Gabriel J.L. Beckers [EMAIL PROTECTED] wrote: Does numpy have something like Matlab's accumarray? http://www.mathworks.com/access/helpdesk/help/techdoc/ref/accumarray.html On Wed, 26 Mar 2008, Robert Kern apparently wrote: No. But of course you can do