Changelog
0.6.1 2026.04.04
[Feature] #580:
Mltcan now be constructed from a pre-built sympy component expression by passing the expression asftogether with an explicitnargsargument. Previously this path raisedNotImplementedError; as a secondary effect,__add__(),__sub__(), and related arithmetic on string-constructed tensors now work correctly. See #578.[Bug] #569:
Ltnow accepts anImmutableDenseMatrixas its matrix argument, fixing aTypeErrorwhen constructing linear transformations from SymPy immutable matrices. See #567.[Bug] #570: Fixed a SymPy 1.13 regression where
trigsimp()raisesZeroDivisionErroron certain trig expressions (e.g. prolate spheroidal coordinates) during LaTeX printing in_latex(). The broadexcept Exceptionwas narrowed toexcept ZeroDivisionErroronly, falling back to the expanded form for display. See #566.[Bug] #582:
is_blade()now correctly identifies null vectors (e.g.e0 + e1inG(1,1)) and null blades (e.g.(e0+e1)^e2inG(1,2)) as blades. Previously the method delegated entirely tois_versor(), which returnsFalsefor null multivectors because they have no inverse. Blade-ness is a metric-free concept; the fix checks grade homogeneity first (grade ≤ 1 is always a blade) then falls back to the outer-product squaring testB ^ B == 0for the null case. See #537.[Bug] #590: Worked around a performance regression in SymPy 1.13 that caused
examples/ipython/LaTeX.ipynb(check('curvi_linear_latex')) to time out after 600 s on SymPy ≥ 1.13. SymPy PR #26390 added an O(N·M).replace()traversal insideTR3/futrigthat is a no-op for galgebra’s symbolic trig arguments but dominated each of the ~70Simp.applycalls duringGa.build(norm=True)for curvilinear coordinates. The fix usestrigsimp(method='old')viaSimp.profilefor the affected example, cutting run time from > 600 s to < 6 s. A notebook note documents the two cosmetic output differences from the pre-1.13 form; a proper upstream fix is tracked in #576.[Support] #565: CI now tests on Python 3.10, 3.11, and 3.12; Python 3.8 and 3.9 are dropped (both reached end-of-life). See #564.
[Support] #570: Refreshed notebook outputs for SymPy 1.13 printing changes (
\cdotinMulexpressions and column-format specifiers in\begin{array}). Addedscripts/validate_nb_refresh.py— a reusable tool that mechanically confirms a notebook re-execution introduced only cosmetic changes. Addeddoc/dev/bumping-sympy.mddeveloper guide (version policy, local testing, notebook refresh workflow). Bumpedtest_requirements.txtpin fromsympy == 1.12tosympy == 1.13.3. See #568, #566.[Support] #572: Added
doc/dev/bumping-python.mddeveloper guide for bumping the Python version in CI and a release-process runbook (doc/dev/releasing.md). Updated README Python prerequisites. See #571, #573.[Support] #577: Updated the bundled
doc/books/Macdonald/GAlgebraPrimer.pdfto the September 15, 2023 revision by Alan Macdonald and corrected the download URL in README and example documentation. See #575.[Support] #585: Expanded and reorganised
is_blade()test coverage: replaced a single ad-hoc test with nine focused methods covering every branch of the fixed implementation, including null vectors, null bivectors, non-homogeneous multivectors, the cached-flag path, and the null-blade guards added toreflect_in_blade()andproject_in_blade(). Added aslow-marked test that documents the known grade-≥ 3 limitation (theB ^ B == 0outer-product test can return a false positive for non-blades in spaces of dimension ≥ 6 without coordinates); the R⁶ DFM counterexample is preserved as an executable regression guard. Registered theslowpytest marker insetup.cfg. See #537.[Support] #587: Migrated from
setup.pytopyproject.toml(PEP 517/621). The build backend issetuptools>=61;_version.pyremains the single source of truth for the version. The CI publish job now usespython -m buildinstead ofpython setup.py sdist bdist_wheel.setup.pyis removed;setup.cfgis retained for flake8 configuration. See #586.[Support] #589: Added Step 0 to the release-process runbook (
doc/dev/release-process.md): open a release issue before preparing the changelog or branching, so that motivation, scope, and unusual pre-release todos are recorded. See #588.
0.6.0 2026.04.01
[Feature] #510: Added example notebooks for typical GAs by Greg Grunberg, and they are now part of the tests:
Standard 2D Model \(\mathcal{G}_2\): g2
Standard 3D Model \(\mathcal{G}_3\): g3
Standard 4D Model \(\mathcal{G}_4\): g4
3D Homogeneous Coordinates \(\mathcal{G}_4\): h3
3D Conformal Model, Amsterdam convention \(\mathcal{G}_{4,1}\): cm3
Spacetime algebra: spacetime
Sphere-related algebras:
Geometric algebra for unit sphere in \(\mathbb{R}^3\) using spherical coordinates: sp2
Unit sphere \(\mathbb{R}^3\) as a submanifold of \(\mathcal{G}_3\) in cartesian coordinates: sp2g3
A geometric algebra for the unit sphere in \(\mathbb{R}^3\) as a submanifold of \(\mathbb{R}^3\) with spherical coordintes: sp2sp3
Spherical Coordinates in \(\mathbb{R}^3\): sp3
[Feature] #510: Improved functionality for
Mv,Ltby Greg Grunberg, with improved test coverage and minor fixes.Changes by Greg Grunberg include (see the attached notebooks in #478 for details):
The following methods of
Mvare added, along with their corresponding functions (applied to multivectorsAandB):Undualization:
A.undual()andundual(A)Grade involution:
A.g_invol()andg_invol(A)
The following methods of
Mvare improved, along with their corresponding functions:Ltis significantly improved and fixed, see also Linear Transformations / Outermorphisms in GAlgebra:Ltadopts the contravariant-covariant indexing notation long used in tensor analysis and differential geometry, which is consistent with the indexing notation GAlgebra already uses for the display of a multivector’s basis blade expansionSymbolic_Matrix()allows the creation, for a symbolic transformation \(\lt{T}\), of matrices with entries of any of the four forms \({T^i}_j\), \(T^{ij}\), \(T_{ij}\), or \({T_i}^j\), although GAlgebra will use only the first two.Dictionary_to_Matrix()fixes a bug that incorrectly raises an exception if T maps one or more of the basis vectors to the zero multivector, and improves the readability.Ltfixes a bug that erroneously post multiplies the transformation’s standard matrix byself.Ga.g_inv(the reciprocal metric tensor), resulting in a contravariant-contravariant matrix \([T^{ij}] = [{T^i}_k g^{kj}]\) instead of the standard matrix \([{T^i}_j]\). In the same spirit,matrix()now returns the standard matrix $[{T^i}_j]$ instead of the product matrix \([{T^i}_j][g_{ij}]\).Ltnow distinguishes symmetric and antisymmetric transformations from general transformations,Amatwill be the standard matrix \([{T^i}_j]\) of the transformation whenmode=='g', , but will be \([T_{ij}]\) whenmode in ['s','a']. Since \([g^{ij}][T_{ij}] = [{T^i}_j]\), in either caseLt.__init__will receive the standard matrix as its first parameter.Ltnow correctly handles Versor input, and initializes the internallt_dictfor the versor-based linear transformation.Ltadds support for both even and odd versors, after generalization of spinors to versors inMv.For versor based transformations, the inverse transformation
inv()is now based on simply \(\til{\mbf{V}}\) instead of \(\mbf{V}^{-1} = {\frac 1 {\mbf{V} \til{\mbf{V}}}} {\til{\mbf{V}}}\), as a versor-based transformation is independent of taking nonzero scalar multiples of the versor.Ltadds support for LaTeX printing of versor-based transformations.The determinant method
det()for a linear transformation is fixed, it now uses directly the geometric algebra definition of \(\lt{L}\)’s determinant: \(\det(\lt{L}) = \lt{L}(\mbf{E}) \mbf{E}^{-1}\), where \(\mbf{E}\) denotes the basis blade \(\mbf{E} = \es{1} \wedge \cdots \wedge \es{n}\) for the grade space of pseudoscalars.
Minor fixes includes:
normis fixed by usingmetric.square_root_of_exprinstead ofsqrtmaking a “spinor” mv is kept for backward compatibility with existing tests, which is still aliased to making an “even” mv, see discussions
10. An unimplemented suggestioninChanges to module lt.pyattached in #478fixed linting errors reported by
flake8fixed some typos of
return,raiseetc.
[Feature] #510: Added
gprintby Alan Bromborsky developed back in 2020, which improved printing of text and LaTeX for multiple GA objects in Jupytper notebooks, and is the recommended way to print GA formulas, see Demo of gprint for a demonstration. Testability and test coverage are improved.[Feature] #530: Added
shirokov_inverse()andhitzer_inverse()(and their module-level counterpartsshirokov_inverse(),hitzer_inverse()) for computing the multivector inverse using the Shirokov and Hitzer algorithms.[Feature] #543:
Mvnow supportsscalar / Mvvia__rtruediv__(), so expressions like1 / spinorwork without explicitly callinginv(). See #512.[Feature] #550: Added
galgebra.interop.Cl()andgalgebra.interop.kingdon.Cl()as aCl(p, q, r)interface compatible with kingdon and ganja.js conventions, making it easier to port code between galgebra and other GA libraries. See #524.[Bug] #511:
Mvnow correctly handles negative integer power.[Bug] #513:
Mvnow correctly handles differentiating by a coordinate symbol.[Bug] #516:
gradesno longer incorrectly returnsNoneunder some circumstances, as now all initialization branch will correctly callcharacterise_Mv().[Bug] #518:
Mvnow correctly returnsMvinstance when raise to power of zero. But in general, if one needs to callMvmethods on a result returned by some GA operations, it would be more prudent to initialize it as anMvinstance first, as sometimes the result becomes asympyobject.[Bug] #540:
Lt()callable constructor now accepts the zero multivector as a return value, so projection maps (e.g.lambda x: (x | e1) * e1) no longer raiseValueError.[Bug] #536:
is_versor()is improved following GSG’s analysis: it now checks that (1) the scalar product with the reverse is a nonzero scalar and (2) the grade-involution sandwich maps every basis vector to a vector. Handles degenerate metrics (e.g. PGAG(2,0,1)) correctly. See #533.[Bug] #554:
norm()andnorm()now wrap the result inAbs()for even-grade multivectors, fixing incorrect simplification to negative values. See #522.[Bug] #556:
galgebra.interop.Cl()now resets the global dual mode to galgebra’s default ('I+') after each call, preventing silent contamination when calls togalgebra.interop.Clandgalgebra.interop.kingdon.Clare interleaved. See #555.[Support] #510: Testing infrastructure for generating and diffing PDFs is added, see
test/test_gprinter.pyand.github/workflows/ci.ymlfor details.[Support] #535: Fixed CI and linting issues.
[Support] #552: Refactored internals for clarity and correctness:
er_blade()delegates toMulinstead of hand-rolling the same logic (#140).ReciprocalFrameloop rewritten with a cleaner index convention matching the sign formula in the reference text (#249).
[Support] #545: Added a regression test for the spurious
\cdotin LaTeX output, confirming the fix documented in #494 holds.[Support] #558: Added regression tests for
matrix()on oblique and non-Euclidean metrics, and for the genericlt()constructor, confirming the fixes from #461 hold.[Support] #548: Improved README to document the full set of available GA operations. See #523.
[Support] #551: Added
examples/tutorial demonstrating how to extract scalar coordinates from a multivector usingget_coefs()andblade_coefs(). See #483.[Support] #549: Added examples validating galgebra against Russell Goyder’s sundial analysis and geometric algebra cheat sheet (#506):
examples/Terminal/sundial.py: rotors, reflections, projections, rejections, and the dual inG(3,0)as used in the sundial problem.test/test_cheatsheet.py(#557): pytest tests for all 7 sections of the cheat sheet — geometric product decomposition, vector-multivector products, bivector identities, commutator product, pseudoscalar, outermorphism, and adjoint.
0.5.2 2024.05.01
[Support] #517: Add citation info, star history, contributors to README, and fix zenodo citation issue for
0.5.1.
0.5.1 2024.03.31
[Feature] #436: The
Gaconstructor now allows algebras with only a single basis vector, via a trailing comma in the list of bases. This enables algebras like the complex (Ga('i,', g=[-1])) and dual (Ga('delta,', g=[0])) numbers to be used.[Feature] #450: ANSI printing can now be turned off with
Eprint(deriv=None, fct=None, base=None).[Feature] #454:
galgebra.lt.Ltobjects can now be used withGas that are not constructed with acoordsargument.[Feature] #492: (also #473) Support Python 3.8-3.11, drop support for earlier Python versions.
[Feature] #493: SymPy 1.9-1.12 are tested and supported.
[Bug] #448: Calling
galgebra.printer.Eprint()no longer causes ANSI escape codes to appear in the names of the coefficients ofga.mv('A', 'vector').[Bug] #467: Basis vectors are not normalized in
Metricwithnorm=Truewhen derivatives of basis vectors aren’t available.[Bug] #468: Hyperbolic functions now requires explicit
collectandtrigsimpto simplify unlike SymPy 1.6.1 and before.[Bug] #494: There is an extra
\cdotin LaTeX output for multiplication between a numeric power and a polynomial with a leading numeric coefficient since SymPy 1.10. This has to be fixed by SymPy, before that, be cautious when seeing unexpected\cdotin LaTeX output.[Bug] #495:
MatrixFunctionis broken since SymPy 1.11, which is required by initializingGawithgsymandcoords, this is now fixed with a workaround (#507).[Support] #450: Many undocumented parts of
galgebra.printer.Eprint()have been removed:The
debugargument toEprint, which just printed out the other arguments.The
onargument toEprint, which ifFalsejust made the call do nothing at all. Useif cond: Eprint(...)instead ofEprint(..., on=cond).The overrideable default settings
Eprint.defaults.The constant dictionaries
Eprint.ColorCodeandEprint.InvColorCode.The class methods
Eprint.Base,Eprint.Fct,Eprint.Deriv, andEprint.Strip.The class attributes
Eprint.base,Eprint.fct,Eprint.deriv, andEprint.normal.
If you were relying on these details to implement your own ANSI printing, it is recommended that you use a package like
coloramainstead.[Support] #454: The
l.coordsandl.Xattributes ofgalgebra.lt.Ltobjects are deprecated in favor of usingl.Ga.coordsandl.Ga.coord_vec.[Support] #455: The static method
formatand the attributeLt.mat_fmtofgalgebra.lt.Ltare removed as they were never used.[Support] #457: Line-wrapping of the plaintext printing are disabled by default, as it makes reviewing the output easier, to re-enable it, call
sympy.init_printingwithwrap_line=True.[Support] #458: The output of
Ltobjects now use \(\mapsto\) instead of naming the transformation.[Support] #459: Various cleanups and fixes to
Lt:Construction of
Ltfrom a linear function is fixedThe broken construction of
Ltfrom a tuple is removedThe code of
Dictionary_to_MatrixandMatrix_to_dictionaryis improvedProperties of
Ltare tidied, documented, and better tested (#460)
[Support] #476: Make tests more robust by directly testing the printer, rather than
__str__.[Support] #487: CI has been changed to Github Actions.
[Support] #497: The documentation is now built with the latest Sphinx (7.2.6) and MathJax 3.
[Support] #503: The README now supports Github dark mode, and is included by
sphinx_mdincludein Sphinx with improved support for TOC and math formulas.
0.5.0 2020.06.05
[Feature] #326: The
galgebra.ga.Ga.make_grad()function now accepts multivectors, not just vectors.[Feature] #243:
galgebra.mv.Mv.subs()now accepts all the same arguments assympy.subs().[Feature] #252: (also #310) Many attributes of
Gainstances are now _always_ present, rather than being conditionally present depending on the type of algebra. These include:Other properties that are still only meaningful for some algebras now exist but raise clearer error messages:
These lists are not exhaustive.
[Feature] #336: The scalar product \(a * b\) is now available via
galgebra.ga.Ga.scalar_product(). Note that there is no operator overload on multivectors yet.[Feature] #364: The galgebra print customizations
Dmode,Fmode,fmt, andMlt.lcntcan now be set via:sympy.init_printing( omit_function_args=True, # Fmode omit_partial_derivative_fraction=True, # Dmode galgebra_mv_fmt=1, # fmt galgebra_mlt_lcnt=1, # lcnt )
These names are provisional, and may change in future.
[Feature] #364: The galgebra printer now respects the global
inv_trig_stylesympy print setting.[Feature]: Generally improved documentation, including:
The re-inclusion of missing code examples that were already referenced from the text (#293).
Faster and smaller pages with less MathJax loading time (#292, #296).
An adapted version of a notebook tutorial from Alan Bromborsky is now present in the docs, Introduction to using GAlgebra (#375).
Correction of curly quotes that led to invalid python syntax (#294).
[Feature] #212: Python 2.7 is no longer supported, allowing more features from Python 3.x to be used.
[Feature] #232: Python 3.8 is now supported and tested.
[Bug] #344:
galgebra.metric.collect()no longer discards terms that were not requested.[Bug] #53: Calling
sympy.sympify()(or any other sympy function) on aMvinstance no longer raisesRecursionError, and instead raisesTypeErrorwith a helpful message.[Bug] #258: The result of simplifying sympy expressions is no longer dependent on whether
galgebra.printer.Format()has been called.[Bug] #264:
Dopno longer emits latex strings when printed in non-latex mode.[Bug] #319:
galgebra.ga.Ga.make_grad()no longer crashes when called on an algebra with nocoords.[Bug] #319:
galgebra.ga.Ga.make_grad()no longer has a broken cache that ignorescmpflgif both the left and right gradient operator are requested for the same vector[Bug] #319:
galgebra.mv.Mv.get_coefs()now returns0in the place of empty coefficients.[Bug] #320:
galgebra.lt.Mltno longer crashes at construction, arithmetic, or multiplication.[Bug] #323: (also #377, #340) Many non-
Mvobjects now render better in the default sympy printer. This bug manifested most often when usingMv.obj, and would result in misrenderings like \(e^e_{xy}\) when \(e_x \wedge e_y\) was intended, or \(e_{x.y}\) when \(e_x \cdot e_y\) was intended.[Bug] #348:
galgebra.printer.Print_Function()no longer emits code after the function body. Previously, examples had adef dummy(): passfunction to work around this.[Bug] #354:
galgebra.printer.oprint()no longer strips the last)fromsympy.Matrixobjects within lists.[Bug] #369: The
fmtargument fo theFmtmethod ofMv,Dop,Lt,Mltno longer has side effects on subsequentprintstatements.[Bug] #369: (also #380) The
Fmtmethod ofMv,Dop,Lt,Mvnow works properly in both IPython (giving plaintext output) and Jupyter (giving LaTeX output).[Bug] #372: For scalar multivectors, the printed result is now mathematically equivalent in plaintext and latex mode.
[Bug] #378: (also #379) The post-processing performed by
galgebra.printer.tex()is now better-behaved:It no longer translates
gradinto \(\nabla\) if it is part of a longer word likegradual.It no longer mangles occurrences of
@@.It no longer throws away
#and%symbols that appear in the middle of lines.It no longer injects stale information from previous lines into subsequent lines.
It now strips all leading and trailing whitespace before wrapping in
equationoralign.
[Bug] #382: The result of calling
galgebra.printer.latex()on a multi-vector when the globalgalgebra_mv_fmtsetting is not 1 is now valid to use within math mode.[Bug] #387:
galgebra.printer.Print_Function()no longer emits invalid LaTeX with an unwanted\\[Bug] #391: Subtracting a scalar from a
Mvinstance no longer fails.[Bug] #431: Left and right contraction are no longer swapped on scalar
Exprinstances.[Support] #64: The following attributes have been deprecated in favor of using the new
flatattribute:galgebra.ga.Ga.indexes_lst→galgebra.ga.Ga.indexes.flatgalgebra.ga.Ga.bases_lst→galgebra.ga.Ga.bases.flatgalgebra.ga.Ga.blades_lst→galgebra.ga.Ga.blades.flatgalgebra.ga.Ga.mv_blades_lst→galgebra.ga.Ga.mv_blades.flat
Since the replacement properties also include the scalar element,
ga.blades_lstis equivalent toga.blades.flat[1:](and likewise for the other properties).[Support] #245: (also #248, #334) The following attributes have been deprecated to reduce the number of similar members in
Ga.Unified into the
table_dictattribute ofProductFunctioninstances:galgebra.ga.Ga.wedge_table_dict→wedge.table_dictgalgebra.ga.Ga.left_contract_table_dict→left_contract.table_dictgalgebra.ga.Ga.right_contract_table_dict→right_contract.table_dictgalgebra.ga.Ga.dot_table_dict→hestenes_dot.table_dictgalgebra.ga.Ga.mul_table_dict→mul.table_dictgalgebra.ga.Ga.basic_mul_table_dict→basic_mul.table_dict
Unified into methods of
ProductFunctioninstances:galgebra.ga.Ga.non_orthogonal_bases_products→basic_mul.of_basis_basesgalgebra.ga.Ga.wedge_product_basis_blades→wedge.of_basis_bladesgalgebra.ga.Ga.geometric_product_basis_blades→mul.of_basis_bladesgalgebra.ga.Ga.dot_product_basis_bladesandgalgebra.ga.Ga.non_orthogonal_dot_product_basis_blades→<some_dot_type>.of_basis_blades. In future it will no longer be possible to call the non-ortho method for an orthogonal ga, or vice-versa.
Unified into
galgebra.ga.Ga.blade_expansion_dict:galgebra.ga.Ga.blade_expansion→blade_expansion_dict.items()
Unified into
galgebra.ga.Ga.base_expansion_dict:galgebra.ga.Ga.base_expansion→base_expansion_dict.items()
Unified into
galgebra.ga.Ga.basic_mul_table_dict:galgebra.ga.Ga.basic_mul_table→basic_mul_table_dict.items()galgebra.ga.Ga.basic_mul_keys→basic_mul_table_dict.keys()galgebra.ga.Ga.basic_mul_values→basic_mul_table_dict.values()
Unified into
galgebra.ga.Ga.indexes_to_bases_dict:galgebra.ga.Ga.indexes_to_bases→indexes_to_bases_dict.items()galgebra.ga.Ga.bases_to_indexes→indexes_to_bases_dict.inverse.items()galgebra.ga.Ga.bases_to_indexes_dict→indexes_to_bases_dict.inverse
Unified into
galgebra.ga.Ga.indexes_to_bases_dict:galgebra.ga.Ga.indexes_to_blades→indexes_to_blades_dict.items()galgebra.ga.Ga.blades_to_indexes→indexes_to_blades_dict.inverse.items()galgebra.ga.Ga.blades_to_indexes_dict→indexes_to_blades_dict.inverse
[Support] #280: The
galgebra.utilsmodule, which provided Python 2 compatibility helpers, has been deprecated.[Support] #335: The undocumented method
galgebra.ga.Ga.X()(the same ascoords_vec) has been deprecated.[Support] #338: The undocumented and mispelt static method
galgebra.lt.Mlt.extact_basis_indexes()(which just computed a value equivalent togalgebra.ga.Ga.basis_super_scripts) has been deprecated.[Support] #202:
PdopandSdopinstance are no longer associated with a Ga. As a result, their.Gaattribute no longer exists, and thepdop()andsdop()methods ofGaare deprecated in favor of calling the constructors directly. For Ga-aware operators, continue to useDop.[Support] #216:
galgebra.metric.test_init_slotshas been removed. The functionality this provided is superseded by the language feature of keyword-only arguments.[Support] #252: (also #310) The
inverse_metric()andderivatives_of_g()methods ofMetricare deprecated, as the properties they computed (g_invanddg) are now computed automatically.[Support] #259:
galgebra.printer.oprintnow aligns results in columns[Support] #284: (also #317)
galgebra.lt.Lt.setup()has been deprecated, along with the attributes it populatedgalgebra.ga.Ga.lt_x(the same ascoords_vec) andgalgebra.ga.Ga.lt_coords(the same ascoords).[Support] #286: The
galgebra.deprecatedmodule, which provides old-style APIs, now emitsDeprecationWarnings.[Support] #320: The following attributes of
galgebra.ga.Gahave been removed:a
[Support] #349:
galgebra.printer.Get_Program()is deprecated. This function used to have to be called beforegalgebra.printer.Print_Function(), but now all it does is act as an enable/disable flag for the latter, such thatGet_Program(True); Print_Function()was a no-op.[Support] #358:
galgebra.printer.find_executablehas been removed, as the functionality is provided byshutil.which().[Support] #367: (also #364, #369) The following properties of
GaLatexPrinterandGaPrinterhave been removed:fmtprev_fmtdop_fmtprev_dop_fmtlt_fmtprev_lt_fmtDmodeFmodeinv_trig_styledop
[Support] #367: The
fmt_dopargument to anddop_fmtattribute ofgalgebra.mv.Dophave been removed, as they had no effect.[Support] #376: (also #258, #371) The
repr()andstr()of bothgalgebraandsympyobjects will no longer ever return latex strings, instead always returning plaintext strings. If you want latex strings, usegalgebra.printer.latex(). Note that this does not affect support forprint(sympy_object), which continues to print latex representations providedgalgebra.printer.Format()has been called.[Support] #384: The
dopargument toFormat(), along with the corresponding static member ofLatexPrinter, has been removed, as had no effect.[Support] #385:
galgebra.printer.print_replacehas been removed.[Support] #386: The
titleattribute ofDophas been removed. as it was alwaysNone.[Support] #393:
galgebra.dop.Sdop.str_modehas been removed, as it was alwaysFalse.
0.4.5 2019.12.31
[Feature] #50: (also #51, #56) Improve documentation formatting:
LaTeX and code samples are now appropriately formatted
Attributes of classes now have permalinks
[Feature] #66: The
mul_table_dicttable, and the equivalent tables for the other products, are now computed lazily when indexed. These are now all documented too.[Feature] #66: Remove unused or unusable code in the public API:
Ga.mul_table,Ga.wedge_table,Ga.dot_table,Ga.left_contract_table, andGa.right_contract_table, all of which were the empty list,[].galgebra.mv.modules, a string which served no purpose (#71).__add_ab__,__sub_ab__,__mul_ab__, and__div_ab__, none of are real magic method names (#67). No code should be calling these directly anyway.Dop.flatten_one_levelwhich is better speltitertools.chain.from_iterable(#175).Dop.basic, which was a non-working version ofgrads()(#185).Pdop.setGa,Sdop.setGa,Dop.setGa, all of which rely on dangerous global state - use thegakeyword argument of the constructors of these types instead (#163).
[Feature] #78:
grads()now raises a better error when it fails, and is faster.[Feature] #164: (and #169, #170) Sympy 1.5 is officially supported and tested.
[Feature] #172:
galgebra.__version__has been added, which contains the version string.[Feature] #195: Deprecate confusing parts of the public API:
galgebra.ga.Ga.mv_I(), which was a bad way to spellgalgebra.ga.Ga.E().galgebra.ga.Ga.mv_x(), which was a bad way to create a vector with a weird name.Pdop(None), which is better speltPdop({}), the latter of which has always worked (#187).galgebra.ga.Ga.Pdop_identity(), which is better speltga.pdop({})(#194).galgebra.ga.Ga.Pdiffs(), which is better speltga.pdop(x)(#194).galgebra.ga.Ga.sPds(), which is better speltga.sdop(x)(#194).
[Bug] #60: (also #141) Make the following operations on
galgebra.mv.Mvnon-mutating:diff()expand()print(mv)
Any code relying on this behavior will need to change from
x.method()tox = x.method(). Note that the latter syntax was always supported even before this change.[Bug] #61: Make contraction and Hestenes dot products thread-safe. Previously these relied on the
dot_modesetting not being changed mid-operation. Thedot()method still respects this setting, but is no longer used internally.[Bug] #80: (also #57, #58, #97) The
galgebra.mv.Mvconstructor no longer silently accepts illegal arguments, and produces better error messages.[Bug] #81: (also #180) Passing coefficients as
Mv(coefs, 'odd', ga=ga)is forbidden.[Bug] #90:
galgebra.ga.Ga.blades,galgebra.ga.Ga.bases, andgalgebra.ga.Ga.indicesnow reference the scalarS(0)as the single grade-0 object. Previously they listed no grade 0 objects.[Bug] #134:
dot_table_dictnow contains correct values (zero) for scalar keys[Bug] #151: (also #150)
Dop,Sdop, andPdopno longer have mutating methods. This fixed issues where not only would the laplacian be sometimes calculated incorrectly, but its correctness would vary depending on whether it had been printed![Bug] #165:
galgebra.metric.linear_expand()no longer accepts a mode argument, as this did not work properly. For the old behavior oflinear_expand(x, mode=True), uselinear_expand_terms(x)instead.[Bug] #177:
Dopobjects that evaluate to0no longer raise crypticValueErrors when operated on.[Bug] #151:
Dop([], ga=ga)andSdop([], ga=ga)now evaluate to multiplication by zero, not by one. Multiplication by one can as always be speltDop([(S(1), Pdop({}, ga=ga}))], ga=ga).[Bug] #157: Adding an
Sdopinstance to a scalar now works as intended, rather than crashing.[Bug] #183:
op1 == op2now works correctly forSdopandDopinstances.[Bug] #187:
Pdopno longer silently accepts extra arguments.[Bug] #187:
Sdop(x)now functions as intended as an alias ofSdop([(S(1), Pdop({x: 1}))]), which previously crashed.[Bug] #188: Passing a
gakeyword-argument tosm(),mv(), andlt()is now an error, previously it was silently ignored.[Bug] #188:
pdop()andsdop()are now transparent aliases toPdopandSdop, respectively. Previously, they would crash.[Support] #46: (also #69) Remove unnecessary executable bit from importable python files, and the corresponding no-op code that would be run.
[Support] #55: Rename
*kargsto*argsinternally, to match convention. This has no effect on callers, but makes the docs and source easier to read.[Support] #59: (also #65) Make internal attributes and helper functions private. All of the following have been made private by being renamed:
Mv.make_grad(#59).Mv.make_scalar(#59).Mv.make_vector(#59).Mv.make_bivector(#59).Mv.make_pseudo_scalar(#59).Mv.make_multivector(#59).Mv.make_spinor(#59).Mv.make_odd(#59).Ga.build_bases()(#65).Ga.basis_product_tables()(#65).Ga.build_reciprocal_basis()(#65).Ga.build_connection()(#65).Ga.non_orthogonal_mul_table()(#65).Ga.base_blade_conversions()(#65).Ga.init_connect_flg()(#65).Ga.derivatives_of_basis()(#65).Ga.lt_flg(#65).Ga.agrads(#65).Ga.dbases(#65).Ga.XOX(#195).
[Support] #72: Other internal cleanup.
[Support] #167: Python 3.4 is no longer supported.
[Support] #83: This is the last release to support Python 2.7.
0.4.4 2019.09.30
[Feature] #9: Documentation now available at https://galgebra.readthedocs.io/
[Feature] #17: Fix examples under both Python 2 & 3
Fix examples/* and verify them in CI using nbval
Test coverage increased from 48.89% to 66.52%
Add README for test and examples
[Bug] #31: Freeze the depended version of SymPy to 1.3
[Bug] #32: Fix calculation of reciprocal basis for non-orthogonal basis
[Bug] #30: Fix bugs of using LaTeX as symbol name
[Bug] #29: Fix that sometimes plain text is printed with or instead of LaTeX in Jupyter Notebooks
[Bug] #27: Fix broken class MV
[Bug] #26: Fix calculation of the Christoffel symbols
[Bug] #18: Fix TypeError of unicode string, use BytesIO instead of StringIO
[Bug] #15: Fix printing of some products and inverses of multivectors
[Support] #17: Setup Circle CI to build more Python versions faster
TravisCI build for PRs is now removed
0.4.3 2018.02.18
[Feature] #2: Support Python 3
Convert code to be Python 3 compatible
Pass tests under both Python 2 & 3
Support installing from PyPI instead of setting pth
Support importing with from galgebra.<package name> import *
[Bug] #2: Fixes brombo/galgebra#20: Incorrect LaTeX output in test_derivatives_in_spherical_coordinates
[Bug] #2: Fixes brombo/galgebra#19: Failures in test_noneuclidian_distance_calculation
[Support] #2: Clean up obsolete code in setup.py and make it simple
[Support] #2: Remove .pyc files and add standard .gitignore for python
[Support] #8: Remove NumPy dependency
[Support] #8: Validate existing Jupyter notebooks using nbval
[Support] #8: Add test coverage in CI using using pytest and CodeCov
[Support] #2: Setup Travis CI