Here, we have listed some Jupyter notebooks that exemplify the usage of various features offered by EinsteinPy. We have broadly divided them into two categories: Symbolic and Numerical computations. To run these notebooks on the web, please use the binder link provided below.


Symbolic computations

These notebooks demonstrate the features of the symbolic module in EinsteinPy. You can use this module to access several pre-defined metrics or define custom ones, and calculate quantities such as the Christoffel symbols, Ricci tensor, Ricci scalar, Riemann curvature tensor, Einstein tensor and Weyl tensor. Since this module is based on SymPy, you can also use the lambdify() function to convert EinsteinPy’s symbolic expressions into NumPy-compatible functions. Indicial operations are also possible using this module, as shown in the notebook on contravariant and covariant indices.

Numerical computations

These notebooks show how to use the various numerical methods offered by EinsteinPy. Using these, you can compute and plot geodesics for manifolds described by (electro-)vacuum solutions to Einstein’s field equations. You can also calculate and view manifold singularities in these cases or calculate black hole shadows and hypersurface embeddings for certain spacetimes. EinsteinPy’s plotting module also enables making animations like these:

Kerr Singularities for different values of spin parameter Geodesic Animation in extremal Kerr Spacetime