-
-
Notifications
You must be signed in to change notification settings - Fork 701
Closed
Milestone
Description
Currently, the abs operator cannot be applied to scalar fields:
sage: M = Manifold(2, 'M', structure='topological')
sage: X.<x,y> = M.chart()
sage: f = M.scalar_field({X: x*y}, name='f', latex_name=r"\Phi")
sage: abs(f)
Traceback (most recent call last)
...
TypeError: bad operand type for abs(): 'ScalarFieldAlgebra_with_category.element_class'
In this ticket, we add this feature.
CC: @egourgoulhon @tscrim
Component: manifolds
Author: Michael Jung
Branch/Commit: 2095de3
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/32396