Skip to content

Commit

Permalink
Fixes #516
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed May 10, 2024
1 parent f83f63f commit b5c6a6c
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
59 changes: 59 additions & 0 deletions examples/ipython/issue-516.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "ee7c8882-7356-441a-920e-3603d081002b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1]\n",
"[1]\n"
]
}
],
"source": [
"from galgebra.ga import Ga\n",
"import sympy as S\n",
"\n",
"ga = Ga('e', g=[1,1,1], coords=S.symbols(f\"0:3\", real=True), wedge=False)\n",
"x,y,z = ga.mv()\n",
"a = ga.mv('A','mv')\n",
"print((a.grade(0)*x).grades)\n",
"print((a.grade(0)^x).grades)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8920d631-eb4f-4955-9558-9dc158b5171e",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
1 change: 1 addition & 0 deletions galgebra/mv.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ def __init__(self, *args, ga: 'Ga', recp=None, coords=None, **kwargs):
self.obj = x.obj
self.is_blade_rep = x.is_blade_rep
self.i_grade = x.i_grade
self.characterise_Mv()
else:
if isinstance(x, Expr): # copy constructor for obj expression
self.obj = x
Expand Down

0 comments on commit b5c6a6c

Please sign in to comment.