About alternatives to Matlab

sturlamolden sturlamolden at yahoo.no
Fri Dec 15 15:07:55 EST 2006


Jon Harrop wrote:

> Can convolution be implemented efficiently in Python?

numpy.convolve


> Functional programming makes this easy. You just compose closures from
> closures instead of arrays from arrays.

Indeed. But learning yet another language is too much work.


> This is what I meant by optimising Python takes you in the wrong direction
> (foresting). I think you're only using slice-based rewriting because it is
> fast in Python, not because it is a good idea. So, is it worth adding
> slicing to F#?

If you only think in times of run-time speed, probably not. But it has
other advantages, particularly ease of programming.

> That makes perfect sense. I think F# could become a better Python but I need
> to understand the relative benefits offered by Python first.

When I look at F# or Lisp I see line noise, even though I know the
syntax in theory. I don't get a mental image of what the code does. I
spend 2/3 of the time reading code when I write a program.

Second, Python is very easy to write, and complicated problems can be
handled with few lines of code (compared to e.g. C).




More information about the Python-list mailing list