JeS24 on main
Updated README.rst to fix build… (compare)
ImportError Traceback (most recent call last)
<ipython-input-2-f52a1194b34a> in <module>
1 import numpy as np
2
----> 3 from einsteinpy.coordinates.utils import four_position, stacked_vec
4 from einsteinpy.geodesic import Geodesic
5 from einsteinpy.metric import Schwarzschild
ImportError: cannot import name 'four_position' from 'einsteinpy.coordinates.utils' (C:\Users\Lenovo\Anaconda3\lib\site-packages\einsteinpy\coordinates\utils.py)
julia
installation, since the solver is written in Julia and the Python interface is a wrapper over it. This has been tackled in the "latest" code (v0.4.dev0 on GitHub), that removes the Julia dependency but trades Julia's speed for Python's convenience. We are planning to develop the Julia code separately and perhaps have a backend switch, once the codebase matures.
Hi! I may have found a found a bug in einsteinpy. Either that or I have a fundamental misunderstanding about how to use it. The Riemann curvature tensor should always be skew symmetric: R_abcd = -R_abdc. However in the following example this is not the case. I am working with a 2D metric with line element ds^2 = -2 du dr - K(u, r) du^2:
import sympy
from einsteinpy.symbolic import MetricTensor, RiemannCurvatureTensor
syms= sympy.symbols("u r")
u, r = syms
K = sympy.Function("K")(u, r)
metric_array = [[-K, -1], [-1, 0]]
metric = MetricTensor(metric_array, syms)
rie = RiemannCurvatureTensor.from_metric(metric)
rie = rie.change_config("llll")
rie[0][1][1][0] == -rie[0][1][0][1] # Returns False
The last line should return true for any valid Riemann tensor if I understand correctly, but the R_urru component gives zero. Have I made a mistake or is this a bug? Am I accessing the tensor components incorrectly perhaps?
pip install git+https://github.com/einsteinpy/einsteinpy.git
.
pip install einsteinpy
. This would install einsteinpy-0.3.1 (AKA "stable"). What you want is einsteinpy-0.4.dev0 (AKA "latest"), that you can install via pip install git+https://github.com/einsteinpy/einsteinpy.git
. This pulls the most recent code from our GitHub repo. The documentation for this version can be found at https://docs.einsteinpy.org/en/latest .
pip uninstall einsteinpy
before you install the latest version.
tandersen@tomm1 bin % ./conda init zsh
no change /opt/homebrew/Caskroom/miniforge/base/condabin/conda
no change /opt/homebrew/Caskroom/miniforge/base/bin/conda
no change /opt/homebrew/Caskroom/miniforge/base/bin/conda-env
no change /opt/homebrew/Caskroom/miniforge/base/bin/activate
no change /opt/homebrew/Caskroom/miniforge/base/bin/deactivate
no change /opt/homebrew/Caskroom/miniforge/base/etc/profile.d/conda.sh
no change /opt/homebrew/Caskroom/miniforge/base/etc/fish/conf.d/conda.fish
no change /opt/homebrew/Caskroom/miniforge/base/shell/condabin/Conda.psm1
no change /opt/homebrew/Caskroom/miniforge/base/shell/condabin/conda-hook.ps1
no change /opt/homebrew/Caskroom/miniforge/base/lib/python3.9/site-packages/xontrib/conda.xsh
no change /opt/homebrew/Caskroom/miniforge/base/etc/profile.d/conda.csh
modified /Users/tandersen/.zshrc
==> For changes to take effect, close and re-open your current shell. <==
tandersen@tomm1 bin % pwd
/opt/homebrew/Caskroom/miniforge/base/bin