Why we use Python in Scientific Research

Having been developed by Guido van Rossum since the late of 1980s, Python programming language has been increasingly gaining popularity and recognized by the community as one of the most powerful general-purpose programming languages. Most of Python’s users have learnt that Python can do almost everything that you can think of, but, what about “Scientific research”? In this article, the author will walk you through some reasons that how and why scientists use Python to drive the researches. Moreover, some popular Python’s libraries will be provided so that you can follow what we will be talking about, and also you can find the details of those libraries later.

Are you ready? Let’s go!!

  1. Python is a highly extensible language. It has been mostly written in C and C++ for the sake of performance and efficiency. Python uses the C Foreign Function Interface (CFFI) for Python to directly interact with C engine. Tools such as SWIG make this easy to accomplish. Developers can also call Fortran subroutines from Python by using the Fortran to Python interface generator package, F2Py, which is now a part of NumPy, a popular scientific computing library for Python. Other than that, Python has very good input/output (I/O) options which is so important especially advanced scientific computing that deals with a giant data workload.
  2. Python has built-in support for scientific computing. Most Python distributions include the SciPy ecosystem (open source) which includes SciPy (a SciPy library), a numerical computation package called NumPy, and multiple independent toolkits, each known as a Scikit-learn.
  3. Python has vibrant and dynamics libraries for graphical visualization. The author believe that most of the readers may have already known Matplotlib, a MATLAB-based (and open-source) plotting library for Python and its numerical mathematics extension NumPy. It provides an object-oriented API for embedding plots into applications using general-purpose GUI toolkits like Tkinter, wxPython, Qt, or GTK+. Another widely-used library is Plotly — an interactive, open-source, high-level, browser-based graphing library that built on top of Plotly.js.
  4. Python has strong support for task automation. Python’s built-in scripting features and multiple packages have strong support for task automation. Automation of repetitive tasks and performing data logging are easy and takes little effort.
  5. Python can use a web frontend. Python packages such as Django and Flask make life of many people easy to develop and deploy websites using Python as an API. This functionality is particularly useful when using a cloud-based infrastructure as a platform to access high-performance computing (HPC) back ends.

To this extent, the author would like to emphasize there is no best programming language. The interesting question at this point is not which programming language is the best among others, but; which programming language that mostly fits my work? And, Python could be a good candidate for you.

Article written by: Rangsiman Ketkaew, organizer of PyCon APAC 2021.

For more information on PyCon APAC 2021, checkout: https://th.pycon.org/

--

--

PyCon Thailand - Host of PyConAPAC 2021
PyCon Thailand — Host of PyConAPAC 2021

PyCon Thailand is run as a Non-profit event and driven by the members of the Python Community in Bangkok. PyCon Thailand is proud to be the host in 2021.