Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pylab import *
- from matplotlib import *
- from mpmath import *
- r, R = 1, 2.5
- f = lambda u, v: [r*cos(u), (R+r*sin(u))*cos(v), (R+r*sin(u))*sin(v)]
- splot(f, [0, 2*pi], [0, 2*pi])
- ---------------------------------------------------------------------------
- TypeError Traceback (most recent call last)
- <ipython-input-42-3f3bdff4f661> in <module>()
- 5 r, R = 1, 2.5
- 6 f = lambda u, v: [r*cos(u), (R+r*sin(u))*cos(v), (R+r*sin(u))*sin(v)]
- ----> 7 splot(f, [0, 2*pi], [0, 2*pi])
- /Users/kevin/anaconda/lib/python2.7/site-packages/mpmath/visualization.pyc in splot(ctx, f, u, v, points, keep_aspect, wireframe, file, dpi, axes)
- 227 points = [points, points]
- 228 M, N = points
- --> 229 u = pylab.linspace(ua, ub, M)
- 230 v = pylab.linspace(va, vb, N)
- 231 x, y, z = [pylab.zeros((M, N)) for i in xrange(3)]
- /Users/kevin/anaconda/lib/python2.7/site-packages/numpy/core/function_base.pyc in linspace(start, stop, num, endpoint, retstep, dtype)
- 91 stop = stop * 1.
- 92
- ---> 93 dt = result_type(start, stop, float(num))
- 94 if dtype is None:
- 95 dtype = dt
- TypeError: data type not understood
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement