5 ms·
>So we get PEP 484, which is ugly but might help Python survive. Might. This seems really hyperbolic. I'm not sure Go really competes in the same space as Pyth
by rpcope1 11y ago
>So we get PEP 484, which is ugly but might help Python survive. Might.
This seems really hyperbolic. I'm not sure Go really competes in the same space as Python; also Python is so well entrenched as the successor to Fortran in the scientific computing space, that this would seem to guarantee continued relevance far into the future. It's probably like a lot of things, it may not be as sexy or break neck fast (though PyPy is staged to change that, and maybe we can also feasible get a non-sucky version of IronPython or Jython), but it's pretty much everywhere now, kind of like Perl, C, PHP, Java....
- andrepd 11y ago>also Python is so well entrenched as the successor to Fortran in the scientific computing space Uhhh... no. FORTRAN is literally the fastest programming language in existence. Maybe Python is good for prototyping or pre/post-processing some data, but with a performance hit in the 100x order of magnitude, you won't run Python scripts for the bulk of any serious scientific computing project.
- rpcope1 11y agoI think numpy and scipy[1] beg to differ. You should go look at what's actually available in terms of scientific computing on Python, as I think you might actually learn something (hint: numpy is really a bunch of Python wrappers over FORTRAN routines, if you look at the source code). Having been a PhD student in Physics, in particular (at an Ivy League university, nonetheless), I can tell you that the majority of new code we were writing was Python, and since I've left, it's probably gotten more so. A good example of Python in physics, is PyMCA[2]. Python is really poised to also (thank god) reduce the marketshare of Matlab. [1] http://docs.scipy.org/doc/numpy-dev/f2py/getting-started.html http://docs.scipy.org/doc/numpy-dev/f2py/getting-started.htm... [2] http://pymca.sourceforge.net/ http://pymca.sourceforge.net/ Also: http://www.quora.com/How-did-Python-dominate-scientific-computing http://www.quora.com/How-did-Python-dominate-scientific-comp... http://programmers.stackexchange.com/questions/138643/why-is-python-used-for-high-performance-scientific-computing-but-ruby-isnt http://programmers.stackexchange.com/questions/138643/why-is... Finally as a Physics person, you might also like the coursework for this (I certainly enjoyed the course): http://pages.physics.cornell.edu/~myers/teaching/ComputationalMethods/ http://pages.physics.cornell.edu/~myers/teaching/Computation...
- saintdako 11y agoanother thing to consider is f2py, which allows calls to Fortran subroutines from Python. in my experience, it was faster than numpy, but you have to suffer from writing Fortran.
- Lofkin 11y agoJust use numba and get fortran like performance by writing in python.
- saintdako 11y agoI got inconsistent results when using Numba. when it worked well, it was way faster than Numpy, but sometimes it was slower. I wasn't able to figure out how to do AOT compilation, so I just went with f2py. if Numba has AOT compilation, I'd definitely use that over f2py though.
- Lofkin 11y agoAOT compilation is in the works. Also you might have been using features that numba didn't support yet. They just added more numpy ops, array allocation and vector ops, so your code might be working now.
- saintdako 11y agoI am no longer working on the project (it was part of a 4-month research project), but I'll make sure to tell my supervisor. thanks! :D
- Lofkin 11y agoYes, python is not the future...but no, Julia and Python's Numba is just as fast as FORTRAN.
- ngoldbaum 11y agoMaybe not pure Python, but one of the best features of CPython is easy interoperability with C or Fortran. Python is the glue for hard-to-use but blazing fast numerical libraries. You can also write very fast code in Cython, which has basically the same syntax as Python.
- capnrefsmmat 11y agoMost scientific computing is not "serious". My past couple papers, for example, have been mostly Python analysis of geospatial data. I use Python because it's easy to integrate with Postgres/PostGIS, and the numerical code provided by Numpy is fast enough. (I drop down into Cython when needed.) The algorithms I need to run aren't hugely intensive -- at most, something might take an hour to run, and most of my simulations take just a minute or two. I don't need raw speed. I need development speed so I can easily iron out bugs and try new methods. My colleagues develop in R for the same reason.
- polemic 11y ago> "Most scientific computing is not "serious"" Stopped reading after this.
- bigger_cheese 11y agoI think it depends what you count as scientific computing. I'm an engineer at an industrial plant and like you for offline non intensive stuff when I have to knock up a prototype fast I use SAS mostly because it has good integration with databases and I can crank out code very fast using it. My housemate is a Math/Stats person he works in finance and uses R for much the same reasons. Maybe Python is useful but it would have to offer me something compelling to make me switch over.
- RogerL 11y agoPython is used in a vast amount of scientific codes. I do a very significant chunk of my work in Python. And heck, I reach to C++ to do the pre/post processing, believe it or not, the inverse of what you suspected.