When I going to make a srf by addSrfPtGrid, it always be Error

import rhinoscriptsyntax as rs

import math

def s(u, v):

x = (1 + ((v - 1) / 2) * math.cos(u / 2)) * math.cos(u)

y = (1 + ((v - 1) / 2) * math.cos(u / 2)) * math.sin(u)

z = ((v - 1) / 2) * math.sin(u / 2)

return rs.CreatePoint(x, y, z)

n = rs.GetInteger(“Value1”)

m = rs.GetInteger(“Value2”)

pts = [ for i in range(n * m - 1)]

for i in range(0, n - 1):

u = 2 * math.pi * i / (n - 1)

for j in range(0, m - 1):

v = 2 * j / (m - 1)

pts[i * m + j] = s(u, v)

rs.AddSrfPtGrid([n, m], pts)`Preformatted text`

Message: Error in IEnumeratorOfTWrapper.Current. Could not cast: Rhino.Geometry.Point3d in IronPython.Runtime.List