[sage-devel] Re: tutorial on Python functional programming for mathematicians

2009-12-15 Thread Harald Schilly
On Dec 15, 4:34 am, mhampton hampto...@gmail.com wrote: Thanks for pointing that out.  I was looking for svd, lower-case, and missed it. actually, me too. Is there a reason why it is uppercase? I'm for renaming it to lowercase and adding an uppercase synonym for backwards compatibility. h --

[sage-devel] Re: tutorial on Python functional programming for mathematicians

2009-12-15 Thread Jason Grout
Harald Schilly wrote: On Dec 15, 4:34 am, mhampton hampto...@gmail.com wrote: Thanks for pointing that out. I was looking for svd, lower-case, and missed it. actually, me too. Is there a reason why it is uppercase? I'm for renaming it to lowercase and adding an uppercase synonym for

[sage-devel] Re: tutorial on Python functional programming for mathematicians

2009-12-14 Thread kcrisman
With respect to some of this discussion, see also the following sage- support request: http://groups.google.com/group/sage-support/browse_thread/thread/9e6475494f85cd53 - kcrisman -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an

[sage-devel] Re: tutorial on Python functional programming for mathematicians

2009-12-14 Thread Jason Grout
mhampton wrote: If you convert to numpy matrices, then Sage is pretty competitive with matlab. We still have some room for improvement in making it easy though - despite Jason Grout's improvements, a matrix over RDF is missing some methods I'd like, such as the singular value decomposition.

[sage-devel] Re: tutorial on Python functional programming for mathematicians

2009-12-14 Thread Jason Grout
Jason Grout wrote: Use .SVD(): I should mention that .SVD just calls numpy/scipy for the actual computation. Jason -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more

[sage-devel] Re: tutorial on Python functional programming for mathematicians

2009-12-14 Thread mhampton
Thanks for pointing that out. I was looking for svd, lower-case, and missed it. -Marshall On Dec 14, 6:33 pm, Jason Grout jason-s...@creativetrax.com wrote: Jason Grout wrote: Use .SVD(): I should mention that .SVD just calls numpy/scipy for the actual computation. Jason -- To post

[sage-devel] Re: tutorial on Python functional programming for mathematicians

2009-12-13 Thread mhampton
If you convert to numpy matrices, then Sage is pretty competitive with matlab. We still have some room for improvement in making it easy though - despite Jason Grout's improvements, a matrix over RDF is missing some methods I'd like, such as the singular value decomposition. As an example, to

[sage-devel] Re: tutorial on Python functional programming for mathematicians

2009-12-13 Thread Harald Schilly
On Dec 13, 1:02 am, Minh Nguyen nguyenmi...@gmail.com wrote: I have written a draft of a tutorial on functional programming for mathematicians. Very nice, i added a comment and I just repeat it here. I think you should also point to the operator python package, since defining add in a function

[sage-devel] Re: tutorial on Python functional programming for mathematicians

2009-12-13 Thread chris wuthrich
Thanks a lot for this tutorial. I think it would be great to have it included in the documentation. I did not know anything about functional programming before using sage. To a new mathematical user without python knowledge things like lambda = 4 SyntaxError: invalid syntax lambda? No object

[sage-devel] Re: tutorial on Python functional programming for mathematicians

2009-12-12 Thread Jason Grout
Minh Nguyen wrote: Hi folks, I have written a draft of a tutorial on functional programming for mathematicians. The tutorial is available on the Sage wiki [1], but you could also find it at Wordpress [2]. This is a redundancy measure in case the wiki is down. I invite you to comments on it

[sage-devel] Re: tutorial on Python functional programming for mathematicians

2009-12-12 Thread Nils Bruin
On Dec 12, 4:24 pm, Jason Grout jason-s...@creativetrax.com wrote: [f(x) for x in [1..10] if f(x)0] This is actually bad style. It means that f gets evaluated twice for all the values that end up in the list. The magma language solves this with modified semantics for the where clause. One would

[sage-devel] Re: tutorial on Python functional programming for mathematicians

2009-12-12 Thread Jason Grout
Nils Bruin wrote: On Dec 12, 4:24 pm, Jason Grout jason-s...@creativetrax.com wrote: [f(x) for x in [1..10] if f(x)0] This is actually bad style. It means that f gets evaluated twice for all the values that end up in the list. Good point. The magma language solves this with modified

Re: [sage-devel] Re: tutorial on Python functional programming for mathematicians

2009-12-12 Thread Minh Nguyen
Hi Jason, On Sun, Dec 13, 2009 at 11:24 AM, Jason Grout jason-s...@creativetrax.com wrote: SNIP Do you think you could add a sentence or two in the filter section about using list comprehensions to do filters, like you did above in the map section? The tutorial is updated with such an