This week we welcome Prabhu Ramachandran (@prabhu_r) as our PyDev of the Week! Prabhu is a developer of PySPH and the Mayavi packages. Prabhu works for the Indian Institute of Technology Bombay and speaks internationally at Python conferences.
You can see what else Prabhu is up to over on GitHub. Let’s spend a few moments getting to know Prabhu better!
Can you tell us a little about yourself (hobbies, education, etc):
I’m a faculty member at the Department of Aerospace Engineering, Indian Institute of Technology Bombay. I am also associated with the Centre for Machine Intelligence and Data Science at IIT Bombay. I am currently the Head of the Computer Centre at IIT Bombay.
My research broadly revolves around numerical computation especially using particle-based and mesh-free methods for continuum mechanics. I completed my Bachelor of Technology in Aerospace Engineering from the Indian Institute of Technology Madras and stayed on to complete my PhD as well in the same department. I then joined IIT Bombay in 2005. I have been fortunate to have had the opportunity to work with Enthought Inc. over the years and also helped them setup an office in India for a few years in 2011. I’ve also been fortunate to have had the opportunity to spread the adoption of Python in India through the FOSSEE project. I have been a nominated member of the PSF since 2010.
I enjoy reading science fiction when time permits. I am spiritually inclined and spend some time every day on my spiritual practices. I enjoy food and some cooking. I enjoy watching science-fiction and related series and movies. I enjoy swimming and listening to music. I also enjoy wildlife, birdwatching, and traveling with my spouse.
Why did you start using Python?
I think I started using Python in 1998. At that time I knew C and a reasonable amount of C++, I was looking to learn “scripting” languages and was considering Perl, Tcl, and had also seen Python used in Redhat’s Anaconda installer. I was very active in the Indian Linux user’s group. I learned a little Perl but did not find enough free documentation. For some reason I did not like Tcl’s syntax. I then picked up Python as I wanted to use VTK and write visualization scripts for some colleagues in my lab. I was a graduate student at the Indian Institute of Technology Madras at the time.
I learned basic Python in an afternoon using the wonderful Python tutorial. I then started writing Python scripts to visualize data with VTK. I think I was hooked by then.
What other programming languages do you know and which is your favorite?
I know C fairly well. I know enough C++ to write reasonable code but I never liked template metaprogramming back in the day so did not pursue it too much. As a result I would not call myself a C++ expert. I found Python early enough to avoid needing too much advanced C++.
I am familiar with bash and have written fairly large scripts when I was a graduate student. However, I find that I forget any programming language syntax very easily if I do not use the language regularly. After I learned enough Python I almost never needed to write more than 5-10 line bash scripts so I am very rusty.
I know basic x86-64 assembly but this is just enough to understand the code if I see it, I have no need to write assembly by hand.
I’ve dabbled a little with LISP especially in the context of emacs but this was many years ago. I have also dabbled with javascript and am familiar with basic javascript.
I recently came across the V programming language which looks interesting and is easy to learn in an afternoon.
I have been checking out Julia multiple times in the past and earlier this year decided to use it for a small test project.
I have really liked Python the most since I’ve been able to do so many things with it over the years. Given my small test julia project, I really like how easy it is to write efficient code in pure Julia. Their package management is very clean and easy to use. In addition it plays very well with Python. I guess of the non-Python programming languages, Julia is the one I am most interested in currently.
What projects are you working on now?
Over the last few years I’ve mainly been working on the PySPH package that is built by my lab at IIT Bombay. This is an open source package for the Smoothed Particle Hydrodynamics method. There are several ancillary packages that PySPH depends on. One of these is compyle which makes it possible to execute a very restricted subset of Python on a variety of HPC platforms. I’ve developed and continue to maintain the automan package which we use to automate all of our numerical research and publications in the lab. PySPH is fairly mature for our research and so a lot of our recent research does not require major modifications to the package. We make all our research code freely available and the results are often entirely reproducible, you can see some of these projects (papers) here: https://gitlab.com/pypr
I have sporadically been developing and maintaining the Mayavi visualization library over the years but I have been finding it difficult to find the time of late. I released Mayavi 1.0 in 2001 and a redesigned version (which is the basis of the current version) was released in 2005 or 2006 as part of the Enthought Tool Suite. It is a very old package and I tend to tire of maintaining the package. I sometimes have the opportunity to put in some time to add features but that is not as frequent as many of the Mayavi users would like. Over the past few years I have delivered tutorial talks at SciPy and other workshops to popularize the package. Mayavi is quite well used by many folks all over the world.
Which Python libraries are your favorite (core or 3rd party)?
I find it difficult to answer this question since I tend to look at libraries as useful to me or otherwise. So I will try to list some of the libraries that I find the most useful:
- NumPy: for being so important for all scientific computation with Python.
- IPython: for the console and for jupyter notebooks which I use for a lot of my teaching and workshops.
- VTK: for the fantastic quality package that it is. Stands the test of time, provides a hugely important library for 3D visualization.
- matplotlib: for most of my 2D research plots.
- Enthought Tool Suite: this is a hidden gem and provides a lot of very useful functionality that is surprisingly useful in different contexts. I have tended to use this mostly in the context of building UIs for scientific codes.
- Cython, PyOpenCL, PyCUDA, and mpi4py have all been enormously useful for my research.
- I think numba is a very nice development for scientific computing as well.
For those interested in controlling hardware with Python, the ExpEYES project is very interesting and useful.
I am certainly missing many wonderful packages, for example, scipy, pandas, scikit-learn, and pytorch are also really nice packages that have been very useful.
What do you think are the top three most exciting developments in doing science with Python?
Right now I think all the developments in the ML/AI front have been quite remarkable. I think scikit-learn, pytorch, and Tensorflow all have played a major role. In addition, there are many Quantum Computing related tools available in Python. This is another exciting area. Another exciting development is Pyodide and pyscript which opens up some very interesting possibilities. These are definitely exciting as it gives an edge to anyone who knows Python.
What are some of the most surprising things you’ve seen your students do with Python?
You mean apart from crashing their computers with a jupyter notebook? 🙂
Rohan Kaushik, an excellent undergraduate student implemented a triangulator for his research project in pure Python using numba and got performance that was as good as the venerable triangle package and performed even better in certain settings. This was a very pleasant surprise.
One of my students, Aditya Bhosale (currently at UIUC), implemented JIT compilation for Compyle, and I thought that was very cool. It wasn’t really surprising as he is an outstanding student and we knew needed to be done. Similarly, another student, Kunal Puri (currently with Cadence), wrote a Cython wrapper for the ZOLTAN library which was very useful and again not quite surprising given his abilities.
Is there anything else you’d like to say?
I am grateful for all the open source software available today and over the years. Am also grateful to the core developers of Python and also to the many other packages and programming languages as well. The entire software ecosystem around Free and Open source software is really quite amazing. It is worth stopping and thinking about it sometimes. Thank you!
Thanks for doing the interview, Prabhu!
Pingback: ICYMI Python on Microcontrollers Newsletter: CircuitPython 8.2.0-beta.1, Focus on RISC-V and More! #CircuitPython #Python #micropython #ICYMI @Raspberry_Pi « Adafruit Industries – Makers, hackers, artists, designers and engineers!