Python Programming and Visualization for Scientists 2nd Ed

Author: Alex DeCaria and Grant Petty
Publisher: Sundog Publishing
Pages: 372
ISBN: 978-0972903356
Print: 0972903356
Audience: Scientists wanting to use Python
Rating: 2
Reviewer: Mike James
Visualization - a difficult topic and difficult to see how to explain the ideas in a book.

The problem is that it is mostly a matter of knowing what a package can do for you and then figuring out the small details. Only after that can you "get creative".

This is the second edition of a book that has been updated to Python 3, but to be honest it still harks back to Python 2 too much for me. It's not as if Python 2 was still current and to be honest we really should try to just forget it ever existing, apart from when we are forced to deal with legacy code.

The book has a standard textbook format and benefits from colour figures and color syntax highlighting.


Banner

The first part of the book is called Basic Python Programming and basic it is. You can hear the ghost of Python 2 all the way through and it reads more like a short form summary than an explanation of the ideas. Where it does get even the slightest bit advanced you are told to go and look at the documentation, even though the ideas are not that difficult.

Given that this is about science applications, it is deplorable that the section on math functions fails to mention that Python has unlimited-precision integers and rationals - something that really is worth knowing. Other places where things are claimed to be strange or difficult suggests that the authors aren't really familiar with how programmers think. For example, the fact that the slice [s,e] runs from s to just before e is said to be confusing, but programmers have to get used to the idea that iterations generally don't include the end value as we count from zero.

The problem is that this is an account of a programming language written by people who use it rather than people who really understand it. This is the sort of introduction to programming that you so often find aimed at scientists and it is just inadequate and dangerous. And then we wonder why so much scientific code is so poor! 

pythonsci

Part 2 is called Plotting and Visualization and here we really can only expect a set of examples that use pyplot and Numpy. The chapters work their way through ever increasingly complex charts There is also a chapter on Caropy, which is a mapping module that I'm not familiar with. Then we move on to 3D plotting. This is a reasonably nice introduction to plotting but not much more than a hands-on with the documentation would give you. 

Part 3 is called Additional topics and it is just a collection of random interesting things. The section on time doesn't really do justice to Python's new features of date and time. There's a brief introduction to Pandas - just enough to get you started. Next we have a look at some standard scientific data sets. Then an out of place section on regular expressions. From here we have some sections on scientific topics - linear algebra, Fourier analysis and numerical calculus. 

The book concludes with an appendix on Jupyter notebooks and given the subject matter this probably should be a chapter, and one on Latex, which will be useful to scientists needing to publish papers although I'm not sure why it's included here.

Conclusion

This is a book that targets scientists, written by scientists. Is this an excuse for not getting the computer science right? I don't think so. I'm sure the authors would get very upset with me if I decided to write a book on their particular area of expertise, but why does just being able to use a language convince them that they are qualified to write about the language?

If you want a book that presents a set of examples of how to create plots using Python combined with a range of programming topics in no particular order then you might like this book. If you are scientist and want to get ahead in your field I think I would recommend spending more time learning the details and ideas not just of Python but of programming - it's your most powerful tool and you need to treat it as a first class skill, not just an afterthought.

 

To keep up with our coverage of books for programmers, follow @bookwatchiprog on Twitter or subscribe to I Programmer's Books RSS feed for each day's new addition to Book Watch and for new reviews.

Banner


The AWK Programming Language, 2nd Ed

Author: Alfred V. Aho, Brian W. Kernighan and Peter J. Weinberger
Publisher: Addison-Wesley
Pages: 240
ISBN: 978-0138269722
Print: 0138269726
Kindle: B0CCJ1N4X3
Audience: Developers interested in Awk
Rating: 5
Reviewer: Kay Ewbank

The name Brian Kernighan among the authors of this updated classic raises  [ ... ]



The Road to Azure Cost Governance

Author: Paola E. Annis et al
Publisher: Packt Publishing
Pages: 314
ISBN: 978-1803246444
Print: 1803246448
Kindle: B09NW2CTHX
Audience: Bill payers
Rating: 4.5
Reviewer: Ian Stirk

This book aims to help you reduce your Azure costs, how does it fare?


More Reviews
  

Last Updated ( Saturday, 16 July 2022 )