4.0 out of 5.0 -
by Amazon Customer on Dec. 19, 2010
I bought this book, just for a couple of the chapters, but i found myself using more of this book then i expected, and reading all the chapters(even the fortran stuff). I found this book better then all my other "scientific python" books, in that my other books really built toyish apps. This book is meant for people doing production computational science work in python. It doesn't have much btw on super computer's programming and python, aside from a lot on how to integrate c/c++/fortan libraries(i.e. anyone doing major work in python probably is integrating to things like Tesla/Hadoop/mpi ... etc ... and the book didn't go to that level).
5.0 out of 5.0 -
by John K on Sept. 6, 2016
Great reference and well written with excellent examples.
5.0 out of 5.0 -
by Rich on May 14, 2010
I've bought what seems to (my wife) be every Python book out there and I can't tell you how sick I am of spam, spam, spam code! (trivial and obfuscated Python code examples with a common theme focused around one Monty Python skit or another...) Spam code seems to prevail in other Python books. Here finally is a book with code examples that are very clear, are immediately useful to the serious programmer and filled with real life discourse on relative performance differences between Python and other languages that have a reputation for speed. There are clear examples of 'number crunching', producing images and even video animations, hooks into other scientific packages such as MathLab, etc. If you are interested in really learning Python, want to come away from an hour or twos worth of coding experience with a module or two that you can use tomorrow and are not interested in code examples extolling Monty Python silliness, then this is the book for you. While this book is about twice as expensive as many of my other Python books, I wish I had purchased this one first. Even though I've been using Python, seemingly every day, for two years, I kept finding nuggets in this book with what seemed to be every turn of the page. My focus right now is processing extremely large data sets of binary data but I'll soon be looking at image processing and I know I'll be reaching for this book over and over again. Don't hesitate! Just buy the book!
5.0 out of 5.0 -
by pafluxa on Aug. 27, 2013
This book is fantastic. The first third is dedicated to basic Numpy and "daily" operations that engineers and scientists encounter when working with Python, so it resembles a lot to any Numpy/Python book. Nothing "new". The other third, however, is dedicated to GUI programming and integration with Scientific Software. It is full of very useful examples that are not difficult to replicate/modify for your needs. It also addresses more advanced GUI programming using Canvas, C/C++ integration, efficiency, and other subjects I haven't read yet. If you ask me, it has everything I need. And man, when you find yourself without internet connection and *need* to make something work, books can really save you. True story. 5 stars for this one.
5.0 out of 5.0 -
by G. Jaouen on July 26, 2009
I'm giving this book five stars because it was basically written for me. I don't mean that literally, of course. I say that because the usual methods of googling for answers and reading the manual do not work when you are trying to push the limits of what a tool is capable of doing. I do numerical computations for a variety of things -- finding patterns in large data sets, automating data collection and analysis, converting raw serial output into convenient CSV, plotting multidimensional datasets etc. Over the years, I have collected a large number of productivity habits with Matlab, which allows me to do ridiculously convoluted things in a short period of time. You just have to read the introduction of any Python manual to understand why I am switching from Matlab to Python. The problem is -- what will replace all these productivity habits? They need to be replaced with "Pythonic" habits, something that can take years of practice. The beauty about Langtangen's book is that it runs through every one of those techniques. Instead of giving a basic example (what your google search would have provided) or a complete list of, ahem, useless techniques (what the manual would have provided), you get exactly what a seasoned data analyst needs to know to get moving with state-of-the-art commands. The author also discusses optimizations and alternatives in each chapter. The book is also the best source for explaining *why* NumPy should be used by people working with large datasets. Folks love to create toolkits for Python, but some of these are a list of non-intuitive shortcuts that don't provide a substantial improvement over basic Python. Langtangen goes through the pain of explaining the benefits of the package (chapter 4.1.4), so that you can decide for yourself if NumPy is useful for your application. I will not comment on the parts of the book that deal with C and FORTRAN integration because I leave that to more able programmers. I also will not comment on the extensive GUI building chapters because I do not build GUIs. I will point out, though, that I have derived full value out of this book simply by reading, and re-reading chapters 2, 3, 4 and 8. Some will argue that there is too much "basic Python" in these chapters for the whole to be considered advanced computational science -- my opinion is that even when the author describes "basic Python", his examples and intuition make it so that even one who has read a couple of reference books cover-to-cover will learn something about using "basic Python" to perform numerical analysis in a more efficient way. In fact, the book is a testament to doing really convoluted things in a really compact and elegant manner!
4.0 out of 5.0 -
by marcel on July 15, 2012
Most of the book is absolutely great. The downloadable base of utilities is a great set of examples that also proves useful in everyday life. The examples are well thought through and not, as in many other books, just continuations of a fairly useless codebase that tries to make every aspect of Python clear through one 'use(less) case'. The order of the chapters seems somewhat odd at first. In the end it looks like a well designed build-up of complexity, with only a little price to pay (some tiny bits of repetition and to experienced users sometimes unclear where to find what). Although knowledge of Python is not necessary, there is not a lot of space in the book wasted on the basics (previous experience in programming is, in fact, helpful). The book is oriented towards scientists and engineers, with a lot of code ready in C/C++/Fortran who need to glue that code together and possibly do some additional numerical or analysis work on the data. It is also perfectly suited for people who want to use only Python for their (numerical and analysis) work. Topics covered: - Basic Python (clean, clear, quick, some more than usual emphasis on handy I/O functionality) - Advanced Python (clear, many more useful extras like regular expressions, parsing command line options, iterators, etc. than in many other books, good examples, missing topic: decorators) - NumPy and numeric analysis (extensive, very good, could have had more on SciPy, some emphasis on older/obsolete packages like Numeric, ScientificPython, not enough on e.g. Matplotlib) - Interfacing with C/C++/Fortran through arrays (very useful and well explained) - GUI programming (clear, maybe a bit too much of advanced GUI programming, which could have been figured out by interested users by themselves, seems like too much emphasis for this topic) - cgi programming/web interfaces (nice little extra gadget in my opinion, most scientists won't necessarily use this) One feature that highly surprised me was the preferred use of 'from name import *', which I think is a bad habit. At some point it is even presented as useful when the same function name gets redefined in the global namespace, which I think is not something you want people to do. Other than that: great book and definitely worth its price!
5.0 out of 5.0 -
by C. Dunn on Oct. 14, 2004
The author has 2 main goals: 1) To improve the productivity of scientists familiar with specific software systems (especially Matlab, Maple, and Mathematica) by teaching them to "glue" applications together. 2) To advocate Python as the preferred "glue" language. In his own words, "I hope to convince computational scientists having experience with Perl that Python is a preferable alternative, especially for large long-term projects." He has certainly done a creditable job. As an expert in computational differential equations, he neglects neither efficiency nor correctness, while stressing both simplicity and reliability. In this sense, he has done a great service to the Python community. The question is: What justifies the purchase of his book? The answer is: Chapters 4, 9, and 10. Contents: 1. Introduction--26pp Very convincing arguments. 2. Getting Started With Python Scripting--38pp Interesting examples. 3. Basic Python--56pp A too-quick tutorial. Go to python dot org instead. 4. Numerical Computing in Python--48pp Stellar explanations of vectorized array operations. 5. Combining Python with Fortran, C, and C++--36pp Details use of Fortran2Py and SWIG. Mentions many alternatives. 6. Introduction to GUI Programming--70pp Useful examples of Tkinter/pmw widgets. 7. Web Interfaces and CGI Programming--24pp Good source of ideas. 8. Advanced Python--132pp Deep and extensive. Includes: option parsing, regular expressions, data persistence and compression, object-oriented programming, exceptions, generic programming, efficiency. 9. Fortran Programming with NumPy Arrays--32pp All about efficiency and re-use. 10. C and C++ Programming with NumPy Arrays--40pp More about efficiency. NumPy C API, C++ objects, and SCXX. 11. More Advanced GUI Programming--73pp Tedious discussion of both Web and standalone GUIs. BLT, canvas, cgi. 12. Tools and Examples--70pp Excellent examples of PDE solvers, with a powerful GUI, but quite long and tedious. A. Setting up the Required Software Environment--16pp Wonderfully specific installation instructions! B. Elements of Software Engineering--50pp Python's strength! Very practical advice on modularity, documentation, coding style, regression-testing, version-control. Strengths: + Downloadable py4cs package, esp. numpytools module + Great advice everywhere, e.g. CGI checklist, Pythonic programming, and trouble-shooting. + Concrete evidence for most assertions. + Very attractive presentation. Sturdy, high-quality cover, binding and pages. Brief, elegant code fragments (except in Chapter 12). Readable prose. No wasted space. + Available as 5MB pdf file, after purchase of hardcopy. Very nice. + Slides, installation instructions, and errata also at web site. Very professional. My peeves: - Not enough tables to be a useful manual. - On p.428(#7) he points out that handling a raised exception is very slow. However, when I time his example with a positive argument, the try-except version is 20% faster (b/c the if clause is skipped), so he is actually giving bad advice for the general case. Luckily, he contradicts himself later, on page 685: "Exceptions should be used instead of if-else tests." The best advice: Avoid common exceptions in inner loops. - The 10-page index is not as great as it at first seems. (See Martelli's Python in a Nutshell for a better one.) - Pure interface functions should 'raise NotImplementedError', rather than 'return'. - Exceptions should never be trapped mindlessly with 'except:'. That would hide your own SyntaxErrors! - Too many exercises. (It's published as a textbook.) Since there are no answers, the exercises are useless for non-students. (See Lutz's Learning Python for effective exercises with answers.) Overall rating: This contains the best information on numerical programming in Python that I've seen. Though expensive, it could easily be your only Python book, given the excellent online documenation already available.
4.0 out of 5.0 -
by W Boudville on Nov. 12, 2006
Langtangen's emphasis here is on a reader who comes from a strong background in engineering or science, and is familiar with common computational ideas and has done some programming, but not necessarily in Python. The typical book on Python is aimed at a general programming reader, and the examples in such a book usually are quite elementary, from a computational viewpoint. The merit of Langtangen's book is that he gets into a lot of computational ideas. This is not a trivial book. Aspects like parsing data in files, connecting to local and remote hosts, and interacting with programs written in other languages are covered. For the latter, the important cases of Fortran and C programs are explained. The choices of these languages is deliberate. In science and engineering, they are the dominant languages for raw computation. And you are likely to have legacy code written in these, that you cannot abandon while using Python.
5.0 out of 5.0 -
by Michał on April 5, 2008
If you want to learn Python, you should get it. Author do not build some "big" application (like "internet store software" or "bookstore software") from beginning to end, but rather give you a lot of practical examples of using python. It is not like in others book that examples include only learned functions/methods, but use topics from the rest of book (you have example on page 25 and note that explanation of this and that function you found on page 543). By that you have interesting examples to use in real-world problems, not only examples to explain freshly learned topic. In other books interesting examples of use python you found on page 3234, because only when author introduce all useful functions. In this book nice examples is even on first pages. You learn how to use numerical packages (numpy) in python, using some useful tricks on lists and arrays, introduce to using graphical interface in Tk.
5.0 out of 5.0 -
by Amazon Customer on June 12, 2010
As an intermediate Python programmer, this excellent book has become my go to reference for useful intermediate and advanced techniques that I can locate and learn quickly. The writing is clear and not overly verbose. In addition to a wide array of numerical and scientific examples, the book is helpful for a wide range of programming issues, such as gluing together disparate legacy applications, interfacing to C++, regression testing numerical code, building GUI's, web programming, etc.