<jupyter_start><jupyter_text>Contravariant & Covariant indices in Tensors (Symbolic)<jupyter_code>from einsteinpy.symbolic import SchwarzschildMetric, MetricTensor, ChristoffelSymbols, RiemannCurvatureTensor
from einsteinpy.symbolic.predefined import Schwarzschild
import sympy
sympy.init_printing()<jupyter_output><empty_output><jupyter_text>Analysing the schwarzschild metric along with performing various operations<jupyter_code>sch = Schwarzschild()
sch.tensor()
sch_inv = sch.inv()
sch_inv.tensor()
sch.order
sch.config<jupyter_output><empty_output><jupyter_text>Obtaining Christoffel Symbols from Metric Tensor<jupyter_code>chr = ChristoffelSymbols.from_metric(sch_inv) # can be initialized from sch also
chr.tensor()
chr.config<jupyter_output><empty_output><jupyter_text>Changing the first index to covariant<jupyter_code>new_chr = chr.change_config('lll') # changing the configuration to (covariant, covariant, covariant)
new_chr.tensor()
new_chr.config<jupyter_output><empty_output><jupyter_text>Any arbitary index configuration would also work!<jupyter_code>new_chr2 = new_chr.change_config('lul')
new_chr2.tensor()<jupyter_output><empty_output><jupyter_text>Obtaining Riemann Tensor from Christoffel Symbols and manipulating it's indices<jupyter_code>rm = RiemannCurvatureTensor.from_christoffels(new_chr2)
rm[0,0,:,:]
rm.config
rm2 = rm.change_config("uuuu")
rm2[0,0,:,:]
rm3 = rm2.change_config("lulu")
rm3[0,0,:,:]
rm4 = rm3.change_config("ulll")
rm4[0,0,:,:]<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10844976713240187, 'fraction_numerical': 0.012641383898868928, 'mean_word_length': 10.936507936507937, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '65030', 'license': 'MIT', 'n_tokens_mistral': 562, 'n_tokens_neox': 533, 'n_words': 92, 'path': 'docs/source/examples/Playing with Contravariant and Covariant Indices in Tensors(Symbolic).ipynb', 'repo_name': 'ganeshtero/einsteinpy', 'size': '1503'}