File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -484,14 +484,22 @@ def I(self): # Noromalized pseudo-scalar
484484 @property
485485 def mv_I (self ):
486486 # This exists for backwards compatibility. Note this is not `I()`!
487+ # galgebra 0.4.5
488+ warnings .warn (
489+ "`ga.mv_I` is deprecated, use `ga.E()` instead, or perhaps `ga.I()`" ,
490+ DeprecationWarning , stacklevel = 2 )
487491 # default pseudoscalar
488492 return self .E ()
489493
490494 @property
491495 def mv_x (self ):
492496 # This exists for backwards compatibility.
497+ # galgebra 0.4.5
498+ warnings .warn (
499+ "`ga.mv_x` is deprecated, use `ga.mv(your_name, 'vector')` instead" ,
500+ DeprecationWarning , stacklevel = 2 )
493501 # testing vectors
494- return Mv ('XxXx' , 'vector' , ga = self )
502+ return mv . Mv ('XxXx' , 'vector' , ga = self )
495503
496504 def X (self ):
497505 return self .mv (sum ([coord * base for (coord , base ) in zip (self .coords , self .basis )]))
Original file line number Diff line number Diff line change 11import unittest
2+
3+ import pytest
24from sympy import Symbol
35from galgebra .ga import Ga
46from galgebra import utils
57
68class TestMv (unittest .TestCase ):
79
10+ def test_deprecations (self ):
11+ ga , e_1 , e_2 , e_3 = Ga .build ('e*1|2|3' )
12+ with pytest .warns (DeprecationWarning ):
13+ ga .mv_x
14+ with pytest .warns (DeprecationWarning ):
15+ ga .mv_I
16+
817 def test_is_base (self ):
918 """
1019 Various tests on several multivectors.
You can’t perform that action at this time.
0 commit comments