codecov[bot]: # [Codecov](https://codecov.io/gh/einsteinpy/einsteinpy/pull/368?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@fd0429c`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/einsteinpy/einsteinpy/pull/368/graphs/tree.svg?width=650&token=H3oDVYA11f&height=150&src=pr)](https://codecov.io/gh/einsteinpy/einsteinpy/pull/368?src=pr&el=tree)

```diff
@@            Coverage Diff            @@
##             master     #368   +/-   ##
=========================================
  Coverage          ?   93.96%           
=========================================
  Files             ?       50           
  Lines             ?     1823           
  Branches          ?        0           
=========================================
  Hits              ?     1713           
  Misses            ?      110           
  Partials          ?        0
```


| [Impacted Files](https://codecov.io/gh/einsteinpy/einsteinpy/pull/368?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/einsteinpy/symbolic/einstein.py](https://codecov.io/gh/einsteinpy/einsteinpy/pull/368/diff?src=pr&el=tree#diff-c3JjL2VpbnN0ZWlucHkvc3ltYm9saWMvZWluc3RlaW4ucHk=) | `100% <ø> (ø)` | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/einsteinpy/einsteinpy/pull/368?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/einsteinpy/einsteinpy/pull/368?src=pr&el=footer). Last update [fd0429c...97ee0be](https://codecov.io/gh/einsteinpy/einsteinpy/pull/368?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

pep8speaks: Hello @michiboo! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

















* In the file [`src/einsteinpy/tests/test_symbolic/test_christoffel.py`](https://github.com/einsteinpy/einsteinpy/blob/dd4deed3dd23299acf95347c6c7ac636aa0c990e/src/einsteinpy/tests/test_symbolic/test_christoffel.py):

> [Line 102:1](https://github.com/einsteinpy/einsteinpy/blob/dd4deed3dd23299acf95347c6c7ac636aa0c990e/src/einsteinpy/tests/test_symbolic/test_christoffel.py#L102): [E302](https://duckduckgo.com/?q=pep8%20E302) expected 2 blank lines, found 1


diff --git a/src/einsteinpy/symbolic/christoffel.py b/src/einsteinpy/symbolic/christoffel.py
index 00420e1..3a19137 100644
--- a/src/einsteinpy/symbolic/christoffel.py
+++ b/src/einsteinpy/symbolic/christoffel.py
@@ -107,3 +107,23 @@ class ChristoffelSymbols(BaseRelativityTensor):
             new_tensor, self.syms, config=newconfig, parent_metric=metric
         )
         return new_obj
+
+    def lorentz_transform(self, transformation_matrix):
+        """
+        Performs a Lorentz transform on the tensor.
+
+        Parameters
+        ----------
+            transformation_matrix : ~sympy.tensor.array.dense_ndim_array.ImmutableDenseNDimArray or list
+                Sympy Array or multi-dimensional list containing Sympy Expressions
+
+        Returns
+        -------
+            ~einsteinpy.symbolic.christoffel.ChristoffelSymbols
+                lorentz transformed tensor
+
+        """
+        t = super(ChristoffelSymbols, self).lorentz_transform(transformation_matrix)
+        return ChristoffelSymbols(
+            t.tensor(), syms=self.syms, config=self._config, parent_metric=None,
+        )
diff --git a/src/einsteinpy/symbolic/metric.py b/src/einsteinpy/symbolic/metric.py
index c96257a..2e16a82 100644
--- a/src/einsteinpy/symbolic/metric.py
+++ b/src/einsteinpy/symbolic/metric.py
@@ -63,7 +63,7 @@ class MetricTensor(BaseRelativityTensor):
         """
         if newconfig == self.config:
             return self
-        elif newconfig == "uu" or newconfig == "ll":
+        if newconfig == "uu" or newconfig == "ll":
             inv_met = MetricTensor(
                 sympy.simplify(sympy.Matrix(self.arr.tolist()).inv()).tolist(),
                 self.syms,
@@ -71,10 +71,10 @@ class MetricTensor(BaseRelativityTensor):
             )
             inv_met._invmetric = self
             return inv_met
-        else:
-            raise ValueError(
-                "Configuration can't have one upper and one lower index in Metric Tensor."
-            )
+
+        raise ValueError(
+            "Configuration can't have one upper and one lower index in Metric Tensor."
+        )
 
     def inv(self):
         """
@@ -108,3 +108,21 @@ class MetricTensor(BaseRelativityTensor):
         if self.config == "ll":
             return self
         return self.inv()
+
+    def lorentz_transform(self, transformation_matrix):
+        """
+        Performs a Lorentz transform on the tensor.
+
+        Parameters
+        ----------
+            transformation_matrix : ~sympy.tensor.array.dense_ndim_array.ImmutableDenseNDimArray or list
+                Sympy Array or multi-dimensional list containing Sympy Expressions
+
+        Returns
+        -------
+            ~einsteinpy.symbolic.metric.MetricTensor
+                lorentz transformed tensor
+
+        """
+        t = super(MetricTensor, self).lorentz_transform(transformation_matrix)
+        return MetricTensor(t.tensor(), syms=self.syms, config=self._config)
diff --git a/src/einsteinpy/symbolic/ricci.py b/src/einsteinpy/symbolic/ricci.py
index c56ea1e..24d9317 100644
--- a/src/einsteinpy/symbolic/ricci.py
+++ b/src/einsteinpy/symbolic/ricci.py
@@ -140,6 +140,26 @@ class RicciTensor(BaseRelativityTensor):
         )
         return new_obj
 
+    def lorentz_transform(self, transformation_matrix):
+        """
+        Performs a Lorentz transform on the tensor.
+
+        Parameters
+        ----------
+            transformation_matrix : ~sympy.tensor.array.dense_ndim_array.ImmutableDenseNDimArray or list
+                Sympy Array or multi-dimensional list containing Sympy Expressions
+
+        Returns
+        -------
+            ~einsteinpy.symbolic.ricci.RicciTensor
+                lorentz transformed tensor
+
+        """
+        t = super(RicciTensor, self).lorentz_transform(transformation_matrix)
+        return RicciTensor(
+            t.tensor(), syms=self.syms, config=self._config, parent_metric=None,
+        )
+
 
 class RicciScalar(BaseRelativityTensor):
     """
diff --git a/src/einsteinpy/symbolic/riemann.py b/src/einsteinpy/symbolic/riemann.py
index 2f111f1..19fc0a7 100644
--- a/src/einsteinpy/symbolic/riemann.py
+++ b/src/einsteinpy/symbolic/riemann.py
@@ -125,3 +125,23 @@ class RiemannCurvatureTensor(BaseRelativityTensor):
             new_tensor, self.syms, config=newconfig, parent_metric=metric
         )
         return new_obj
+
+    def lorentz_transform(self, transformation_matrix):
+        """
+        Performs a Lorentz transform on the tensor.
+
+        Parameters
+        ----------
+            transformation_matrix : ~sympy.tensor.array.dense_ndim_array.ImmutableDenseNDimArray or list
+                Sympy Array or multi-dimensional list containing Sympy Expressions
+
+        Returns
+        -------
+            ~einsteinpy.symbolic.riemann.RiemannCurvatureTensor
+                lorentz transformed tensor
+
+        """
+        t = super(RiemannCurvatureTensor, self).lorentz_transform(transformation_matrix)
+        return RiemannCurvatureTensor(
+            t.tensor(), syms=self.syms, config=self._config, parent_metric=None,
+        )
diff --git a/src/einsteinpy/symbolic/schouten.py b/src/einsteinpy/symbolic/schouten.py
index c5a884c..89f0ad2 100644
--- a/src/einsteinpy/symbolic/schouten.py
+++ b/src/einsteinpy/symbolic/schouten.py
@@ -102,3 +102,23 @@ class SchoutenTensor(BaseRelativityTensor):
             new_tensor, self.syms, config=newconfig, parent_metric=metric
         )
         return new_obj
+
+    def lorentz_transform(self, transformation_matrix):
+        """
+        Performs a Lorentz transform on the tensor.
+
+        Parameters
+        ----------
+            transformation_matrix : ~sympy.tensor.array.dense_ndim_array.ImmutableDenseNDimArray or list
+                Sympy Array or multi-dimensional list containing Sympy Expressions
+
+        Returns
+        -------
+            ~einsteinpy.symbolic.schouten.SchoutenTensor
+                lorentz transformed tensor
+
+        """
+        t = super(SchoutenTensor, self).lorentz_transform(transformation_matrix)
+        return SchoutenTensor(
+            t.tensor(), syms=self.syms, config=self._config, parent_metric=None,
+        )
diff --git a/src/einsteinpy/symbolic/stress_energy_momentum.py b/src/einsteinpy/symbolic/stress_energy_momentum.py
index 44739de..48a308e 100644
--- a/src/einsteinpy/symbolic/stress_energy_momentum.py
+++ b/src/einsteinpy/symbolic/stress_energy_momentum.py
@@ -87,3 +87,25 @@ class StressEnergyMomentumTensor(BaseRelativityTensor):
             new_tensor, self.syms, config=newconfig, parent_metric=metric
         )
         return new_obj
+
+    def lorentz_transform(self, transformation_matrix):
+        """
+        Performs a Lorentz transform on the tensor.
+
+        Parameters
+        ----------
+            transformation_matrix : ~sympy.tensor.array.dense_ndim_array.ImmutableDenseNDimArray or list
+                Sympy Array or multi-dimensional list containing Sympy Expressions
+
+        Returns
+        -------
+            ~einsteinpy.symbolic.stress_energy_momentum.StressEnergyMomentumTensor
+                lorentz transformed tensor
+
+        """
+        t = super(StressEnergyMomentumTensor, self).lorentz_transform(
+            transformation_matrix
+        )
+        return StressEnergyMomentumTensor(
+            t.tensor(), syms=self.syms, config=self._config, parent_metric=None,
+        )
diff --git a/src/einsteinpy/symbolic/weyl.py b/src/einsteinpy/symbolic/weyl.py
index 35447e7..58900ca 100644
--- a/src/einsteinpy/symbolic/weyl.py
+++ b/src/einsteinpy/symbolic/weyl.py
@@ -96,7 +96,7 @@ class WeylTensor(BaseRelativityTensor):
                 )
             C = sympy.simplify(sympy.Array(C))
             return cls(C, metric.syms, config="llll", parent_metric=metric)
-        elif metric.dims == 3:
+        if metric.dims == 3:
             return cls(
                 sympy.Array(np.zeros((3, 3), dtype=int)),
                 metric.syms,
@@ -138,3 +138,23 @@ class WeylTensor(BaseRelativityTensor):
             new_tensor, self.syms, config=newconfig, parent_metric=metric
         )
         return new_obj
+
+    def lorentz_transform(self, transformation_matrix):
+        """
+        Performs a Lorentz transform on the tensor.
+
+        Parameters
+        ----------
+            transformation_matrix : ~sympy.tensor.array.dense_ndim_array.ImmutableDenseNDimArray or list
+                Sympy Array or multi-dimensional list containing Sympy Expressions
+
+        Returns
+        -------
+            ~einsteinpy.symbolic.weyl.WeylTensor
+                lorentz transformed tensor(or vector)
+
+        """
+        t = super(WeylTensor, self).lorentz_transform(transformation_matrix)
+        return WeylTensor(
+            t.tensor(), syms=self.syms, config=self._config, parent_metric=None,
+        )

Add lorentz_tranform to all the classes in symbolic module
🐞 **Problem**
Many classes like `MetricTensor`, `RiemannCurvatureTensor` does not have the `lorentz_transform()` function as of now!

🎯 **Goal**
Implement it in a similar way as that in `GenericVector` class in `symbolic/vector.py`

  - [x] `GenericVector`
  - [ ] `MetricTensor`
  - [ ] `ChristoffelSymbols`
  - [ ] `RiemannCurvatureTensor`
  - [ ] `RicciTensor`
  - [ ] `StressEnergyMomentumTensor`
  - [x] `EinsteinTensor`
  - [ ] `WeylTensor`
  - [ ] `SchoutenTensor`

📋  **Steps to solve the problem**

 * Comment below about what you've started working on.
 * Add, commit, push your changes
 * Submit a pull request and add this in comments - `Addresses #<put issue number here>`
 * Ask for a review in comments section of pull request
 * Celebrate your contribution to this project 🎉

diff --git a/src/einsteinpy/tests/test_symbolic/test_christoffel.py b/src/einsteinpy/tests/test_symbolic/test_christoffel.py
index fd9018d..82a7354 100644
--- a/src/einsteinpy/tests/test_symbolic/test_christoffel.py
+++ b/src/einsteinpy/tests/test_symbolic/test_christoffel.py
@@ -1,7 +1,9 @@
 import numpy as np
 import sympy
+from sympy import cosh, sinh, symbols
 
 from einsteinpy.symbolic import ChristoffelSymbols, MetricTensor
+from einsteinpy.symbolic.predefined import AntiDeSitter
 
 
 def schwarzschild_metric():
@@ -98,3 +100,27 @@ def test_properties():
         assert False
     except Exception:
         return True
+
+
+def test_lorentz_transform():
+    # currently testing correct instance, proper theoretical tests needed
+    def get_lorentz_matrix():
+        list2d = [[0 for t1 in range(4)] for t2 in range(4)]
+        phi = symbols("phi")
+        list2d[0][0], list2d[0][1], list2d[1][0], list2d[1][1] = (
+            cosh(phi),
+            -sinh(phi),
+            -sinh(phi),
+            cosh(phi),
+        )
+        list2d[2][2], list2d[3][3] = 1, 1
+        return list2d
+
+    def get_tensor():
+        metric = AntiDeSitter()
+        return ChristoffelSymbols.from_metric(metric)
+
+    tm = get_lorentz_matrix()
+    t0 = get_tensor()
+    t1 = t0.lorentz_transform(tm)
+    assert isinstance(t1, ChristoffelSymbols)

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov pytest-xdist pytest-mock pytest-asyncio
apt-get update apt-get install -y gcc
3.6
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
astropy==4.1
async-generator==1.10
attrs==22.2.0
Babel==2.11.0
backcall==0.2.0
black==22.8.0
bleach==4.1.0
certifi==2021.5.30
cffi==1.15.1
charset-normalizer==2.0.12
click==8.0.4
comm==0.1.4
coverage==6.2
cycler==0.11.0
dataclasses==0.8
decorator==5.1.1
defusedxml==0.7.1
distlib==0.3.9
docutils==0.18.1
-e git+https://github.com/einsteinpy/einsteinpy.git@d7537470f4e89e41a92ad99e363d197c9cab071e#egg=einsteinpy
entrypoints==0.4
execnet==1.9.0
filelock==3.4.1
idna==3.10
imagesize==1.4.1
importlib-metadata==4.8.3
importlib-resources==5.4.0
iniconfig==1.1.1
ipykernel==5.5.6
ipython==7.16.3
ipython-genutils==0.2.0
ipywidgets==7.8.5
isort==5.10.1
jedi==0.17.2
Jinja2==3.0.3
jsonschema==3.2.0
jupyter-client==7.1.2
jupyter-core==4.9.2
jupyter-sphinx==0.4.0
jupyterlab-pygments==0.1.2
jupyterlab_widgets==1.1.11
kiwisolver==1.3.1
llvmlite==0.36.0
MarkupSafe==2.0.1
matplotlib==3.3.4
mistune==0.8.4
mpmath==1.3.0
mypy-extensions==1.0.0
nbclient==0.5.9
nbconvert==6.0.7
nbformat==5.1.3
nbsphinx==0.8.8
nest-asyncio==1.6.0
notebook==6.4.10
numba==0.53.1
numpy==1.19.5
packaging==21.3
pandocfilters==1.5.1
parso==0.7.1
pathspec==0.9.0
pexpect==4.9.0
pickleshare==0.7.5
Pillow==8.4.0
platformdirs==2.4.0
plotly==5.18.0
pluggy==1.0.0
prometheus-client==0.17.1
prompt-toolkit==3.0.36
ptyprocess==0.7.0
py==1.11.0
pycodestyle==2.10.0
pycparser==2.21
Pygments==2.14.0
pyparsing==3.1.4
pyrsistent==0.18.0
pytest==7.0.1
pytest-asyncio==0.16.0
pytest-cov==2.5.1
pytest-mock==3.6.1
pytest-xdist==3.0.2
python-dateutil==2.9.0.post0
pytz==2025.2
pyzmq==25.1.2
requests==2.27.1
scipy==1.5.4
Send2Trash==1.8.3
six==1.17.0
snowballstemmer==2.2.0
Sphinx==5.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
sympy==1.9
tenacity==8.2.2
terminado==0.12.1
testpath==0.6.0
toml==0.10.2
tomli==1.2.3
tornado==6.1
tox==3.28.0
traitlets==4.3.3
typed-ast==1.5.5
typing_extensions==4.1.1
urllib3==1.26.20
virtualenv==20.17.1
wcwidth==0.2.13
webencodings==0.5.1
widgetsnbextension==3.6.10
zipp==3.6.0

name: einsteinpy
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - argon2-cffi==21.3.0
      - argon2-cffi-bindings==21.2.0
      - astropy==4.1
      - async-generator==1.10
      - attrs==22.2.0
      - babel==2.11.0
      - backcall==0.2.0
      - black==22.8.0
      - bleach==4.1.0
      - cffi==1.15.1
      - charset-normalizer==2.0.12
      - click==8.0.4
      - comm==0.1.4
      - coverage==6.2
      - cycler==0.11.0
      - dataclasses==0.8
      - decorator==5.1.1
      - defusedxml==0.7.1
      - distlib==0.3.9
      - docutils==0.18.1
      - entrypoints==0.4
      - execnet==1.9.0
      - filelock==3.4.1
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==4.8.3
      - importlib-resources==5.4.0
      - iniconfig==1.1.1
      - ipykernel==5.5.6
      - ipython==7.16.3
      - ipython-genutils==0.2.0
      - ipywidgets==7.8.5
      - isort==5.10.1
      - jedi==0.17.2
      - jinja2==3.0.3
      - jsonschema==3.2.0
      - jupyter-client==7.1.2
      - jupyter-core==4.9.2
      - jupyter-sphinx==0.4.0
      - jupyterlab-pygments==0.1.2
      - jupyterlab-widgets==1.1.11
      - kiwisolver==1.3.1
      - llvmlite==0.36.0
      - markupsafe==2.0.1
      - matplotlib==3.3.4
      - mistune==0.8.4
      - mpmath==1.3.0
      - mypy-extensions==1.0.0
      - nbclient==0.5.9
      - nbconvert==6.0.7
      - nbformat==5.1.3
      - nbsphinx==0.8.8
      - nest-asyncio==1.6.0
      - notebook==6.4.10
      - numba==0.53.1
      - numpy==1.19.5
      - packaging==21.3
      - pandocfilters==1.5.1
      - parso==0.7.1
      - pathspec==0.9.0
      - pexpect==4.9.0
      - pickleshare==0.7.5
      - pillow==8.4.0
      - platformdirs==2.4.0
      - plotly==5.18.0
      - pluggy==1.0.0
      - prometheus-client==0.17.1
      - prompt-toolkit==3.0.36
      - ptyprocess==0.7.0
      - py==1.11.0
      - pycodestyle==2.10.0
      - pycparser==2.21
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pyrsistent==0.18.0
      - pytest==7.0.1
      - pytest-asyncio==0.16.0
      - pytest-cov==2.5.1
      - pytest-mock==3.6.1
      - pytest-xdist==3.0.2
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyzmq==25.1.2
      - requests==2.27.1
      - scipy==1.5.4
      - send2trash==1.8.3
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - sympy==1.9
      - tenacity==8.2.2
      - terminado==0.12.1
      - testpath==0.6.0
      - toml==0.10.2
      - tomli==1.2.3
      - tornado==6.1
      - tox==3.28.0
      - traitlets==4.3.3
      - typed-ast==1.5.5
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - virtualenv==20.17.1
      - wcwidth==0.2.13
      - webencodings==0.5.1
      - widgetsnbextension==3.6.10
      - zipp==3.6.0
prefix: /opt/conda/envs/einsteinpy

src/einsteinpy/tests/test_symbolic/test_christoffel.py::test_lorentz_transform
src/einsteinpy/tests/test_symbolic/test_christoffel.py::test_ChristoffelSymbols src/einsteinpy/tests/test_symbolic/test_christoffel.py::test_TypeError src/einsteinpy/tests/test_symbolic/test_christoffel.py::test_change_config src/einsteinpy/tests/test_symbolic/test_christoffel.py::test_wrong_number_of_indices_ValueError src/einsteinpy/tests/test_symbolic/test_christoffel.py::test_properties
src/einsteinpy/symbolic/ricci.py src/einsteinpy/symbolic/riemann.py src/einsteinpy/symbolic/metric.py src/einsteinpy/symbolic/christoffel.py src/einsteinpy/symbolic/schouten.py src/einsteinpy/symbolic/weyl.py src/einsteinpy/symbolic/stress_energy_momentum.py
src/einsteinpy/symbolic/ricci.py src/einsteinpy/symbolic/riemann.py src/einsteinpy/symbolic/metric.py src/einsteinpy/symbolic/christoffel.py src/einsteinpy/symbolic/schouten.py src/einsteinpy/symbolic/weyl.py src/einsteinpy/symbolic/stress_energy_momentum.py