Skip to content

Commit

Permalink
Move general_exp deprecation to the original expected place
Browse files Browse the repository at this point in the history
  • Loading branch information
hugohadfield committed Dec 27, 2020
1 parent b3db4d3 commit efa563d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 6 additions & 1 deletion clifford/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@

from ._version import __version__ # noqa: F401
from . import _numba_utils
from . import _settings

from ._settings import pretty, ugly, eps, print_precision # noqa: F401
import clifford.taylor_expansions as taylor_expansions

# For backwards-compatibility. New code should import directly from `clifford.operator`
from .operator import gp, op, ip # noqa: F401
Expand All @@ -108,6 +108,11 @@
NUMBA_PARALLEL = not bool(NUMBA_DISABLE_PARALLEL)


def general_exp(x, **kwargs):
warnings.warn("cf.general_exp is deprecated. Use `mv.exp()` or `np.exp(mv)` on multivectors, or `cf.taylor_expansions.exp(x)` on arbitrary objects", DeprecationWarning, stacklevel=2)
return taylor_expansions.exp(x, **kwargs)


def linear_operator_as_matrix(func, input_blades, output_blades):
"""
Return a matrix that performs the operation of the provided linear
Expand Down
7 changes: 1 addition & 6 deletions clifford/_multivector.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@
from ._layout_helpers import layout_short_name


def general_exp(x, **kwargs):
warnings.warn("cf.general_exp is deprecated. Use `mv.exp()` or `np.exp(mv)` on multivectors, or `cf.taylor_expansions.exp(x)` on arbitrary objects", DeprecationWarning)
return taylor_expansions.exp(x, **kwargs)


class MultiVector(object):
"""An element of the algebra
Expand Down Expand Up @@ -324,7 +319,7 @@ def __rpow__(self, other) -> 'MultiVector':
# else.

# pow(x, y) == exp(y * log(x))
newMV = general_exp(math.log(other) * self)
newMV = taylor_expansions.exp(math.log(other) * self)

return newMV

Expand Down

0 comments on commit efa563d

Please sign in to comment.