Hello, I am having trouble plotting this function:

sage: *plot3d([(-t+x)^(0.5)*(sech[(t-x)^2]^2)] (x,-5,5), (t, -5, 5))*
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-10-44b4efea1b7c> in <module>()
----> 1 
plot3d([(-t+x)**(RealNumber('0.5'))*(sech[(t-x)**Integer(2)]**Integer(2))] 
(x,-Integer(5),Integer(5)), (t, -Integer(5), Integer(5)))

/home/sem/SageMath/sage-7.4/src/sage/symbolic/expression.pyx in 
sage.symbolic.expression.Expression.__index__ 
(/home/sem/SageMath/sage-7.4/src/build/cythonized/sage/symbolic/expression.cpp:29931)()
   5303             [0, 1, 2, 3, 4]
   5304         """
-> 5305         return int(self._integer_())
   5306 
   5307     def iterator(self):

/home/sem/SageMath/sage-7.4/src/sage/symbolic/expression.pyx in 
sage.symbolic.expression.Expression._integer_ 
(/home/sem/SageMath/sage-7.4/src/build/cythonized/sage/symbolic/expression.cpp:8088)()
   1075             n = self.pyobject()
   1076         except TypeError:
-> 1077             raise TypeError("unable to convert %r to an integer" % 
self)
   1078         if isinstance(n, sage.rings.integer.Integer):
   1079             return n

TypeError: unable to convert (t - x)^2 to an integer


I am not sure what this is caused by, Both x and t are defined as 
variables, but it asks for an integer .

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to