By Barak Shoshany
Email: [email protected]
Website: https://baraksh.com/
GitHub: https://github.com/bshoshany
GitHub repository: https://github.com/bshoshany/OGRePy
PyPi project: https://pypi.org/project/OGRePy/
- New features:
- Tensor objects can now be compared using the
T.compare()
function. Two tensors are considered equal if their components are the same, and they are associated with the same metric. - OGRePy now correctly displays Markdown and TeX output in JupyterLite.
- Tensor components in OGRePy are now immutable, meaning that they are specified once and for all and cannot be changed. This is done for consistency and simplicity. This means that
permute()
now returns a new tensor with its indices permuted instead of modifying the original tensor. Similarly,simplify()
now returns a new tensor with its components simplified of simplifying the original tensor.
- Tensor objects can now be compared using the
- Citing the package:
- This package now has an arXiv paper! If you use this package in published research, please cite it as follows:
- Barak Shoshany, "OGRePy: An Object-Oriented General Relativity Package for Python", doi:10.48550/arXiv.2409.03803, arXiv:2409.03803 (September 2024)
- Added a
CITATION.cff
file (in YAML format) to the GitHub repository. This should add an option to get a citation in different formats directly from GitHub repository by clicking on "cite this repository" on the sidebar to the right. - Added a
CITATION.bib
file (in BibTeX format) to the GitHub repository. You can use it to easily cite this package in your papers. - For your convenience, the citing information can always be obtained by executing the function
T.cite()
.
- This package now has an arXiv paper! If you use this package in published research, please cite it as follows:
- Bug fixes:
- Fixed a bug where tensor contraction failed when generating a symbol for the new tensor. See #1.
- Fixed math in documentation (apparently Jupyter and GitHub have very different rules with regards to displaying math).
- New features:
- The documentation is now available in HTML format (
OGRePy_Documentation.html
) and PDF format (OGRePy_Documentation.pdf
) in addition to Jupyter Notebook format (OGRePy_Documentation.ipynb
). - Added links to open the documentation in any of these three formats to the welcome message. Note that the documentation is bundled with the package, so this will work offline as well.
- The welcome message can now be disabled either by defining
OGREPY_DISABLE_WELCOME = True
in the notebook or by setting the environment variableOGREPY_DISABLE_WELCOME
toTrue
(which allows you to disable it permanently). This must be done before importing the package. - The package now automatically checks for updates from PyPI when it is imported. This can be disabled by defining
OGREPY_DISABLE_UPDATE_CHECK = True
in the notebook, or setting the environment variableOGREPY_DISABLE_UPDATE_CHECK
toTrue
, before importing the package. In that case, you can still check for updates manually if you wish, usingT.update_check()
. However, note that this check is performed asynchronously, so it does not increase the load time of the package, and you can continue working while the check is being performed. If the welcome message is disabled, the startup update check is performed in "quiet mode", meaning that it only notifies you if a new version is available, but not if you are running the latest version. - Changing the curve parameter now applies retroactively to any tensors previously calculated. Behind the scenes, the curve parameter is stored only as a placeholder, which is replaced dynamically with the user's chosen symbol when the components are displayed with
show()
orlist()
or extracted withcomponents()
.
- The documentation is now available in HTML format (
- Initial release.
- OGRePy is a Python port of my Mathematica package OGRe. Most features have already been fully ported, with a few remaining ones, such as importing/exporting tensors and parallelization, left for subsequent releases in the near future.