Changelog

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 as sympy.subs().

  • [Feature] #252: (also #310) Many attributes of Ga instances 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, and Mlt.lcnt can 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_style sympy print setting.

  • [Feature]: Generally improved documentation, including:

    • The re-inclusion of missing code examples that were already referenced from the text (#293).

    • Fixed footnote and citation references (#287, #290, #291)

    • 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).

    • Type annotations on many functions in the API docs (#305).

    • 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 a Mv instance no longer raises RecursionError, and instead raises TypeError with 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: Dop no 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 no coords.

  • [Bug] #319: galgebra.ga.Ga.make_grad() no longer has a broken cache that ignores cmpflg if both the left and right gradient operator are requested for the same vector

  • [Bug] #319: galgebra.mv.Mv.get_coefs() now returns 0 in the place of empty coefficients.

  • [Bug] #320: galgebra.lt.Mlt no longer crashes at construction, arithmetic, or multiplication.

  • [Bug] #323: (also #377, #340) Many non-Mv objects now render better in the default sympy printer. This bug manifested most often when using Mv.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] #345: e_sq no longer contains a floating point term.

  • [Bug] #348: galgebra.printer.Print_Function() no longer emits code after the function body. Previously, examples had a def dummy(): pass function to work around this.

  • [Bug] #354: galgebra.printer.oprint() no longer strips the last ) from sympy.Matrix objects within lists.

  • [Bug] #369: The fmt argument fo the Fmt method of Mv, Dop, Lt, Mlt no longer has side effects on subsequent print statements.

  • [Bug] #369: (also #380) The Fmt method of Mv, Dop, Lt, Mv now 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 grad into \(\nabla\) if it is part of a longer word like gradual.

    • 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 equation or align.

  • [Bug] #382: The result of calling galgebra.printer.latex() on a multi-vector when the global galgebra_mv_fmt setting 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 Mv instance no longer fails.

  • [Bug] #431: Left and right contraction are no longer swapped on scalar Expr instances.

  • [Support] #64: The following attributes have been deprecated in favor of using the new flat attribute:

    Since the replacement properties also include the scalar element, ga.blades_lst is equivalent to ga.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_dict attribute of ProductFunction instances:

      • galgebra.ga.Ga.wedge_table_dictwedge.table_dict

      • galgebra.ga.Ga.left_contract_table_dictleft_contract.table_dict

      • galgebra.ga.Ga.right_contract_table_dictright_contract.table_dict

      • galgebra.ga.Ga.dot_table_dicthestenes_dot.table_dict

      • galgebra.ga.Ga.mul_table_dictmul.table_dict

      • galgebra.ga.Ga.basic_mul_table_dictbasic_mul.table_dict

    • Unified into methods of ProductFunction instances:

      • galgebra.ga.Ga.non_orthogonal_bases_productsbasic_mul.of_basis_bases

      • galgebra.ga.Ga.wedge_product_basis_bladeswedge.of_basis_blades

      • galgebra.ga.Ga.geometric_product_basis_bladesmul.of_basis_blades

      • galgebra.ga.Ga.dot_product_basis_blades and galgebra.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_expansionblade_expansion_dict.items()

    • Unified into galgebra.ga.Ga.base_expansion_dict:

      • galgebra.ga.Ga.base_expansionbase_expansion_dict.items()

    • Unified into galgebra.ga.Ga.basic_mul_table_dict:

      • galgebra.ga.Ga.basic_mul_tablebasic_mul_table_dict.items()

      • galgebra.ga.Ga.basic_mul_keysbasic_mul_table_dict.keys()

      • galgebra.ga.Ga.basic_mul_valuesbasic_mul_table_dict.values()

    • Unified into galgebra.ga.Ga.indexes_to_bases_dict:

      • galgebra.ga.Ga.indexes_to_basesindexes_to_bases_dict.items()

      • galgebra.ga.Ga.bases_to_indexesindexes_to_bases_dict.inverse.items()

      • galgebra.ga.Ga.bases_to_indexes_dictindexes_to_bases_dict.inverse

    • Unified into galgebra.ga.Ga.indexes_to_bases_dict:

      • galgebra.ga.Ga.indexes_to_bladesindexes_to_blades_dict.items()

      • galgebra.ga.Ga.blades_to_indexesindexes_to_blades_dict.inverse.items()

      • galgebra.ga.Ga.blades_to_indexes_dictindexes_to_blades_dict.inverse

  • [Support] #280: The galgebra.utils module, which provided Python 2 compatibility helpers, has been deprecated.

  • [Support] #335: The undocumented method galgebra.ga.Ga.X() (the same as coords_vec) has been deprecated.

  • [Support] #338: The undocumented and mispelt static method galgebra.lt.Mlt.extact_basis_indexes() (which just computed a value equivalent to galgebra.ga.Ga.basis_super_scripts) has been deprecated.

  • [Support] #202: Pdop and Sdop instance are no longer associated with a Ga. As a result, their .Ga attribute no longer exists, and the pdop() and sdop() methods of Ga are deprecated in favor of calling the constructors directly. For Ga-aware operators, continue to use Dop.

  • [Support] #216: galgebra.metric.test_init_slots has been removed. The functionality this provided is superseded by the language feature of keyword-only arguments.

  • [Support] #252: (also #310) The inverse_metric() and derivatives_of_g() methods of Metric are deprecated, as the properties they computed (g_inv and dg) are now computed automatically.

  • [Support] #259: galgebra.printer.oprint now aligns results in columns

  • [Support] #284: (also #317) galgebra.lt.Lt.setup() has been deprecated, along with the attributes it populated galgebra.ga.Ga.lt_x (the same as coords_vec) and galgebra.ga.Ga.lt_coords (the same as coords).

  • [Support] #286: The galgebra.deprecated module, which provides old-style APIs, now emits DeprecationWarnings.

  • [Support] #320: The following attributes of galgebra.ga.Ga have been removed: - a

  • [Support] #349: galegbra.printer.Get_Program() is deprecated. This function used to have to be called before func:galegbra.printer.Print_Function, but now all it does is act as an enable/disable flag for the latter, such that Get_Program(True); Print_Function() was a no-op.

  • [Support] #358: galgebra.printer.find_executable has been removed, as the functionality is provided by shutil.which().

  • [Support] #367: (also #364, #369) The following properties of GaLatexPrinter and GaPrinter have been removed:

    • fmt

    • prev_fmt

    • dop_fmt

    • prev_dop_fmt

    • lt_fmt

    • prev_lt_fmt

    • Dmode

    • Fmode

    • inv_trig_style

    • dop

  • [Support] #367: The fmt_dop argument to and dop_fmt attribute of galgebra.mv.Dop have been removed, as they had no effect.

  • [Support] #376: (also #258, #371) The repr() and str() of both galgebra and sympy objects will no longer ever return latex strings, instead always returning plaintext strings. If you want latex strings, use galgebra.printer.latex(). Note that this does not affect support for print(sympy_object), which continues to print latex representations provided galgebra.printer.Format() has been called.

  • [Support] #384: The dop argument to Format(), along with the corresponding static member of LatexPrinter, has been removed, as had no effect.

  • [Support] #385: galgebra.printer.print_replace has been removed.

  • [Support] #386: The title attribute of Dop has been removed. as it was always None.

  • [Support] #393: galgebra.dop.Sdop.str_mode has been removed, as it was always False.

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_dict table, 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, and Ga.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_level which is better spelt itertools.chain.from_iterable (#175).

    • Dop.basic, which was a non-working version of grads() (#185).

    • Pdop.setGa, Sdop.setGa, Dop.setGa, all of which rely on dangerous global state - use the ga keyword 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 spell galgebra.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 spelt Pdop({}), the latter of which has always worked (#187).

    • galgebra.ga.Ga.Pdop_identity(), which is better spelt ga.pdop({}) (#194).

    • galgebra.ga.Ga.Pdiffs(), which is better spelt ga.pdop(x) (#194).

    • galgebra.ga.Ga.sPds(), which is better spelt ga.sdop(x) (#194).

  • [Bug] #60: (also #141) Make the following operations on galgebra.mv.Mv non-mutating:

    Any code relying on this behavior will need to change from x.method() to x = 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_mode setting not being changed mid-operation. The dot() method still respects this setting, but is no longer used internally.

  • [Bug] #80: (also #57, #58, #97) The galgebra.mv.Mv constructor 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, and galgebra.ga.Ga.indices now reference the scalar S(0) as the single grade-0 object. Previously they listed no grade 0 objects.

  • [Bug] #134: dot_table_dict now contains correct values (zero) for scalar keys

  • [Bug] #151: (also #150) Dop, Sdop, and Pdop no 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 of linear_expand(x, mode=True), use linear_expand_terms(x) instead.

  • [Bug] #177: Dop objects that evaluate to 0 no longer raise cryptic ValueErrors when operated on.

  • [Bug] #151: Dop([], ga=ga) and Sdop([], ga=ga) now evaluate to multiplication by zero, not by one. Multiplication by one can as always be spelt Dop([(S(1), Pdop({}, ga=ga}))], ga=ga).

  • [Bug] #157: Adding an Sdop instance to a scalar now works as intended, rather than crashing.

  • [Bug] #183: op1 == op2 now works correctly for Sdop and Dop instances.

  • [Bug] #187: Pdop no longer silently accepts extra arguments.

  • [Bug] #187: Sdop(x) now functions as intended as an alias of Sdop([(S(1), Pdop({x: 1}))]), which previously crashed.

  • [Bug] #188: Passing a ga keyword-argument to sm(), mv(), and lt() is now an error, previously it was silently ignored.

  • [Bug] #188: pdop() and sdop() are now transparent aliases to Pdop and Sdop, 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 *kargs to *args internally, 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/

    • Convert doc to Sphinx with the help of pandoc, notedown and nbsphinx

    • Add Getting Started guide to README

    • Update installation instructions in README

    • Add migration guide from sympy.galgebra and brombo/galgebra

    • Add Changelog

    • Add doc for examples, tests and bundled resources

  • [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