Pages

Showing posts with label scipy. Show all posts
Showing posts with label scipy. Show all posts

Review of the book Learning Scipy for Numerical and Scientific Computing

Monday, April 15, 2013


Hi all,

I've finished reading the book "Learning Scipy for Numerical and Scientific Computing".  This book comes to the scientific python series that PacktPub are bringing to the Python Developers! Congratulations!  As the title informs: it includes Scipy, Numpy and Matplotlib.  I only missed some further information about IPython, but it wasn't the goal of the book, so it goes well even leaved out.





It covers several important topics that are not as commonly covered, specially with several snippets illustrating special functions presented at Scipy library. For the developers it will be another great reference book to complement the native docs that comes with the library.  I enjoyed the author focused more on numerical analysis functions, it is one of the most used functions at the library.  

The bool also brings chapters on more specific applications: signal processing, data mining and computational geometry.  There is an extra chapter about the integration with another languages, but I found it not dense enough to explain those integrations. I really missed more start-off examples showing how to install the f2py or how to use Scipy with C/C++. 

Overall the Learning Scipy for Numerical and Scientific Computing book is a good book on Scipy covering  lots of mathematics with examples in Python. The book has a good size and it helps the scientists and scientific developers (by the way the non-developers will face some difficulties due to the heavy math that comes with the examples) to have a good overview on the library before exploring the reference material.


Thanks Kenny for the invitation to review this book, and congratulations to Francisco for bringing one more technical book for scientific python computing to the series!

Regards,

Marcel Caraciolo


Slides for Scientific Computing Meeting: Benchy and GeoMapper Visualization

Sunday, April 7, 2013



Hi all,

Yesterday it happened the XXVI local meeting of the Python Users Group at Pernambuco (PUG-PE).  In the occasion I had the opportunity to present two talks about scientific computing with python.


The first one was the lightweight framework for benchmark analysis on Python Scripts called Benchy, which I developed for about one week to help me on checking performance of several algorithms that I developed in Python.  I covered the framework at my last post which can be found here.


Here are the slides for the presentation:




The second talk was about a new type of visualization that I developed for social network analysis in order to check the degree of connections between the users at the socialnetwork using their geolocation data to present in a map.

The result was beautiful plots using this new type of visualization.  Amazing!

The slides are available here:



I hope you enjoy the slides, any further information feel free to comment!

Regards,

Marcel Caraciolo

Review about the book Numpy Cookbook!

Sunday, February 10, 2013


Hi all,

This year I had the opportunity to review the book Numpy Cookbook by Ivan Idris and published by Pack Publishing. The goal of the book is to present the numpy library through several examples.  The author refers them as recipes.




For my first impression taking a right look into the bok before reading it I could say that the book is not only about Numpy but it also covers another related libraries such as Scipy, Scikit, Matplotlib, Cython, Pandas, Rpy, which I think for the book it's quite better.  Even the title is not well suited to it (it could be such as Scientific Python Cookbook for example), the book is a perfect book for scientific developers and for anyone not much familiar with the libraries, so it offers a fast way to explore it.

I believe the audience of this book if for people who knows how Python works and has some experience on scientific side.


Content


The book is well structured and generally easy to read and digest (congratulations to all Packt books that I read has this same organization).  I like the way the author introduces the examples by using IPython shell instead the regular one. The first experience with Scientific python with IPython must be presented for anyone who works in this field.

The first chapter covers the Ipython and the feature notebook.  It supports Matplotlib and it's a good way os sharing scripts between people.  Great points (even he didn't mention that) when the examples that he shows through the book runs on the Ipython Notebook! :)
The next two chapters he tackles the Numpy aspects: array indexing and several numpy functions.  I didn't like the little mess with different instalations of the packages. However I could install all the packages provided based on the links in the book.  The recipes were quite interesting and I liked the examples with trading stocks. For financial developers those examples are quite attractive!

The fourth chapter handles the Numpy comunication  with other Python modules and other programming languages.  There are several examples covering Matlab, octave, R, Java and even Google App Engine! All of them are simple recipes, so don't expect much of real action or deeper use (Unfortunately!).  You still need to read the docummentations of those interfaces to go beyond of the very basics provided in the book.
I'd like to give an extra credit for the author mentioning the picloud enviroment, a distributed cloud computing provider, which offers pre-installed Python software including numpy for distributed scientific  computing!

The next chapter covers audio and image signal processing and I think it's one of the best scientific recipes approached in the book. Even there's no in-depth details, but creating an audio filter was interesting! Some advanced functions covered in this chapter needs more details such as memmap, clip, etc.   
The Chapter 6 presents more special Numpy classes that can be useful such as masked arrays and recarrays. Those advanced structures can be quite useful in complex algorithms.

The main streams of the book are the next two chapters. Many scientists usually forget: profiling, debugging and quality insurance. The author covers all those topics showing several recipes using several tools ( I believe many of the examples uses nosetests - the author should mention it).  I really appreciate the BDD and the mock objects! I didn't know that!  My opinion for those chapters is that it worths the reading specially about those overlooked topics on scientific books covered in this book.

The chapter 9 gives some interesting recipes on optimizing your code with Cython. By the way it was excellent chapter since we don't have many books handling about those topics. Extra points for tackling a common problem with almost scientists: Call C functions with Python! However, it does not mention Fortran (Fpy) integration.

Finally the last chapter covers the scikit and pandas, that for me they are one of the best frameworks on top of numpy/scipy nowadays covering machine learning, image processing and statistics research fields! Although the recipes are not deeper you can have at a glance of how powerful each framework is and makes you curious to explore each one of them.

Conclusions

The book is well written and it's really easy to read digest. I liked the approach that the author uses by several examples familiar to scientists and scientific developers. It's not a book for Python beginners and it's focused on showing with recipes what the Scientific Python enviroment is capable of. And it does quite well!  I recommend this book for everyone looking to study profoundly with learning experiments the Numpy/Scipy/Matplotlib frameworks. I only miss some deeper explanations about some topics but it does not compromise the book.  Congratulations Packt and Ivan for this great contribution to the scientific python community!



Regards,

Marcel Caraciolo