Creating nurbs surface using degree, control points, knots and weights

Hows this?

import rhino3dm

rational = False
dim = 3
u_cv_count = 6
v_cv_count = 6
u_degree = 3
v_degree = 3
u_order = u_degree + 1
v_order = v_degree + 1

ns = rhino3dm.NurbsSurface.Create(dim, rational, u_order, v_order, u_cv_count, v_cv_count)

#generate knots
ns.KnotsU.CreateUniformKnots(1.0)
ns.KnotsV.CreateUniformKnots(1.0)

#create points
for u in range(0, u_cv_count):
    for v in range(0, v_cv_count):
        pt = rhino3dm.Point4d(u,v,u+v, 1.0)
        ns.Points[(u,v)] = pt

print('Is Surface Valid: ' + str(ns.IsValid))

A thread with a similar request: Help Needed with Creating a NURBS Surface Using rhino3dm.js