| Download
Project: Math and Science
Views: 61Visibility: Unlisted (only visible to those who know the link)
Image: ubuntu2204Kernel: SageMath 9.8
In [1]:
In [2]:
In [3]:
In [4]:
In [5]:
In [6]:
In [7]:
In [8]:
(x, y) |--> (2*x*sin(2*y), 2*x^2*cos(2*y))
In [9]:
In [10]:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In [10], line 2
1 __tmp__=var("x,y,z"); f = symbolic_expression(z * exp(-x*y)).function(x,y,z)
----> 2 plot_vector_field3d(f.gradient(), (x,-Integer(1),Integer(1)), (y,-Integer(1),Integer(1)), (z,-Integer(1),Integer(1)), viewer='threejs')
File /ext/sage/9.8/src/sage/plot/plot3d/plot_field3d.py:148, in plot_vector_field3d(functions, xrange, yrange, zrange, plot_points, colors, center_arrows, **kwds)
146 return G
147 else:
--> 148 G = sum([plot(v, color=cm(v.norm()), **kwds).translate(p) for v, p in zip(scaled_vectors, points)])
149 G._set_extra_kwds(kwds)
150 return G
File /ext/sage/9.8/src/sage/plot/plot3d/plot_field3d.py:148, in <listcomp>(.0)
146 return G
147 else:
--> 148 G = sum([plot(v, color=cm(v.norm()), **kwds).translate(p) for v, p in zip(scaled_vectors, points)])
149 G._set_extra_kwds(kwds)
150 return G
File /ext/sage/9.8/local/var/lib/sage/venv-python3.11.1/lib/python3.11/site-packages/matplotlib/colors.py:714, in Colormap.__call__(self, X, alpha, bytes)
712 xa = np.array(X, copy=True)
713 if mask_bad is None:
--> 714 mask_bad = np.isnan(xa)
715 if not xa.dtype.isnative:
716 xa = xa.byteswap().newbyteorder() # Native byteorder is faster.
TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
In [11]:
In [0]: