simplex-solver 3.2.2__cp39-abi3-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. simplex_solver-3.2.2.dist-info/DELVEWHEEL +2 -0
  2. simplex_solver-3.2.2.dist-info/METADATA +94 -0
  3. simplex_solver-3.2.2.dist-info/RECORD +84 -0
  4. simplex_solver-3.2.2.dist-info/WHEEL +5 -0
  5. simplex_solver.libs/.load-order-simplex_solver-3.2.2 +1 -0
  6. simplex_solver.libs/msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll +0 -0
  7. simplexui/__init__.py +86 -0
  8. simplexui/_version.py +1 -0
  9. simplexui/channelBox.py +867 -0
  10. simplexui/comboCheckDialog.py +396 -0
  11. simplexui/commands/__init__.py +16 -0
  12. simplexui/commands/alembicCommon.py +1148 -0
  13. simplexui/commands/alembic_walker.py +299 -0
  14. simplexui/commands/applyCorrectives.py +452 -0
  15. simplexui/commands/correctiveInterface.py +259 -0
  16. simplexui/commands/expandedExport.py +434 -0
  17. simplexui/commands/hdf5Convert.py +62 -0
  18. simplexui/commands/mayaCorrectiveInterface.py +159 -0
  19. simplexui/commands/mayatonumpy.py +416 -0
  20. simplexui/commands/mesh.py +1085 -0
  21. simplexui/commands/poseblendlib.py +168 -0
  22. simplexui/commands/reorderSimplexPoints.py +102 -0
  23. simplexui/commands/replaceDefinitionJson.py +74 -0
  24. simplexui/commands/rigidAlign.py +97 -0
  25. simplexui/commands/unsubdivide.py +1222 -0
  26. simplexui/commands/uvTransfer.py +976 -0
  27. simplexui/dragFilter.py +334 -0
  28. simplexui/falloffDialog.py +504 -0
  29. simplexui/img/ChefHead.png +0 -0
  30. simplexui/img/frozen.png +0 -0
  31. simplexui/interface/__init__.py +30 -0
  32. simplexui/interface/dummyInterface.py +1313 -0
  33. simplexui/interface/mayaInterface.py +2294 -0
  34. simplexui/interfaceModel.py +655 -0
  35. simplexui/interfaceModelTrees.py +456 -0
  36. simplexui/items/__init__.py +50 -0
  37. simplexui/items/accessor.py +145 -0
  38. simplexui/items/combo.py +645 -0
  39. simplexui/items/dragItem.py +44 -0
  40. simplexui/items/falloff.py +748 -0
  41. simplexui/items/group.py +267 -0
  42. simplexui/items/progression.py +613 -0
  43. simplexui/items/shape.py +384 -0
  44. simplexui/items/simplex.py +1734 -0
  45. simplexui/items/slider.py +632 -0
  46. simplexui/items/stack.py +147 -0
  47. simplexui/items/traversal.py +780 -0
  48. simplexui/items/treeItem.py +441 -0
  49. simplexui/main.pyw +22 -0
  50. simplexui/menu/__init__.py +73 -0
  51. simplexui/menu/dummyPlugins/__init__.py +16 -0
  52. simplexui/menu/genericPlugins/__init__.py +16 -0
  53. simplexui/menu/genericPlugins/_builtins.py +270 -0
  54. simplexui/menu/genericPlugins/checkPossibleCombos.py +48 -0
  55. simplexui/menu/genericPlugins/exportSplit.py +67 -0
  56. simplexui/menu/genericPlugins/showFalloffs.py +26 -0
  57. simplexui/menu/genericPlugins/showTraversals.py +26 -0
  58. simplexui/menu/genericPlugins/simplexUvTransfer.py +106 -0
  59. simplexui/menu/genericPlugins/unsubdivide.py +72 -0
  60. simplexui/menu/mayaPlugins/__init__.py +16 -0
  61. simplexui/menu/mayaPlugins/exportOther.py +53 -0
  62. simplexui/menu/mayaPlugins/extractProgressives.py +68 -0
  63. simplexui/menu/mayaPlugins/freezeCombo.py +247 -0
  64. simplexui/menu/mayaPlugins/generateShapeIncrementals.py +99 -0
  65. simplexui/menu/mayaPlugins/importObjs.py +199 -0
  66. simplexui/menu/mayaPlugins/linearizeTraversal.py +60 -0
  67. simplexui/menu/mayaPlugins/makeShelfBtn.py +67 -0
  68. simplexui/menu/mayaPlugins/relaxToSelection.py +76 -0
  69. simplexui/menu/mayaPlugins/reloadDefinition.py +44 -0
  70. simplexui/menu/mayaPlugins/snapToNeutral.py +71 -0
  71. simplexui/menu/mayaPlugins/softSelectToCluster.py +201 -0
  72. simplexui/menu/mayaPlugins/tweakMix.py +136 -0
  73. simplexui/menu/mayaPlugins/updateRestShape.py +113 -0
  74. simplexui/pysimplex.lib +0 -0
  75. simplexui/pysimplex.pyd +0 -0
  76. simplexui/simplexDialog.py +1547 -0
  77. simplexui/travCheckDialog.py +419 -0
  78. simplexui/traversalDialog.py +299 -0
  79. simplexui/ui/comboCheckDialog.ui +475 -0
  80. simplexui/ui/falloffDialog.ui +243 -0
  81. simplexui/ui/simplexDialog.ui +1458 -0
  82. simplexui/ui/travCheckDialog.ui +488 -0
  83. simplexui/ui/traversalDialog.ui +532 -0
  84. simplexui/utils.py +307 -0
@@ -0,0 +1,416 @@
1
+ from __future__ import annotations
2
+
3
+ from ctypes import c_double, c_float, c_int, c_uint
4
+ from typing import TYPE_CHECKING, TypeVar, Union
5
+
6
+ import numpy as np
7
+ from maya import OpenMaya as om
8
+
9
+ # fmt: off
10
+ _CONVERT_DICT = {
11
+ om.MPointArray: (float, 4, c_double, om.MScriptUtil.asDouble4Ptr),
12
+ om.MFloatPointArray: (float, 4, c_float , om.MScriptUtil.asFloat4Ptr),
13
+ om.MVectorArray: (float, 3, c_double, om.MScriptUtil.asDouble3Ptr),
14
+ om.MFloatVectorArray: (float, 3, c_float , om.MScriptUtil.asFloat3Ptr),
15
+ om.MDoubleArray: (float, 1, c_double, om.MScriptUtil.asDoublePtr),
16
+ om.MFloatArray: (float, 1, c_float , om.MScriptUtil.asFloatPtr),
17
+ om.MIntArray: (int , 1, c_int , om.MScriptUtil.asIntPtr),
18
+ om.MUintArray: (int , 1, c_uint , om.MScriptUtil.asUintPtr),
19
+ }
20
+ # fmt: on
21
+
22
+ OMArrays = Union[
23
+ om.MPointArray,
24
+ om.MFloatPointArray,
25
+ om.MVectorArray,
26
+ om.MFloatVectorArray,
27
+ om.MDoubleArray,
28
+ om.MFloatArray,
29
+ om.MIntArray,
30
+ om.MUintArray,
31
+ ]
32
+ OMPtrs = Union[
33
+ om.MScriptUtil.asDouble4Ptr,
34
+ om.MScriptUtil.asFloat4Ptr,
35
+ om.MScriptUtil.asDouble3Ptr,
36
+ om.MScriptUtil.asFloat3Ptr,
37
+ om.MScriptUtil.asDoublePtr,
38
+ om.MScriptUtil.asFloatPtr,
39
+ om.MScriptUtil.asIntPtr,
40
+ om.MScriptUtil.asUintPtr,
41
+ ]
42
+
43
+ if TYPE_CHECKING:
44
+
45
+ class SwigPyObject:
46
+ def __int__(self) -> int: ...
47
+
48
+
49
+ def _swigConnect(
50
+ mArray: OMArrays, count: int, util: om.MScriptUtil
51
+ ) -> tuple[np.ndarray, OMPtrs]:
52
+ """
53
+ Use an MScriptUtil to build SWIG array that we can read from and write to.
54
+ Make sure to get the MScriptUtil from outside this function, otherwise
55
+ it may be garbage collected
56
+ The _CONVERT_DICT holds {mayaType: (pyType, numComps, cType, ptrType)} where
57
+ pyType: The type that is used to fill the MScriptUtil array.
58
+ numComps: The number of components. So a double4Ptr would be 4
59
+ cType: The ctypes type used to read the data
60
+ ptrType: An unbound method on MScriptUtil to cast the pointer to the correct type
61
+ I can still call that unbound method by manually passing the usually-implicit
62
+ self argument (which will be an instance of MScriptUtil)
63
+ """
64
+ pyTyp, comps, ctp, ptrTyp = _CONVERT_DICT[type(mArray)]
65
+ cc = count * comps
66
+ util.createFromList([pyTyp()] * cc, cc)
67
+
68
+ # passing util as 'self' to call the unbound method
69
+ ptr = ptrTyp(util)
70
+ mArray.get(ptr)
71
+
72
+ if comps == 1:
73
+ cdata = ctp * count
74
+ else:
75
+ # Multiplication follows some strange rules here
76
+ # I would expect (ctype*3)*N to be an Nx3 array (ctype*3 repeated N times)
77
+ # However, it gets converted to a 3xN array
78
+ cdata = (ctp * comps) * count
79
+
80
+ # int(ptr) gives the memory address
81
+ cta = cdata.from_address(int(ptr))
82
+
83
+ # This makes numpy look at the same memory as the ctypes array
84
+ # so we can both read from and write to that data through numpy
85
+ npArray = np.ctypeslib.as_array(cta)
86
+ return npArray, ptr
87
+
88
+
89
+ def _swigConnectMatrix(
90
+ mat: om.MMatrix, ctp: type[c_double] | type[c_float]
91
+ ) -> tuple[np.ndarray, SwigPyObject]:
92
+ # With a matrix, you can just get the double[4][4] without an MScriptUtil
93
+ ptr: SwigPyObject = mat.matrix
94
+ cdata = ctp * 4 * 4
95
+
96
+ # int(ptr) gives the memory address
97
+ cta = cdata.from_address(int(ptr))
98
+
99
+ # This makes numpy look at the same memory as the ctypes array
100
+ # so we can both read from and write to that data through numpy
101
+ npArray = np.ctypeslib.as_array(cta)
102
+ return npArray, ptr
103
+
104
+
105
+ def mayaToNumpy(mArray: OMArrays) -> np.ndarray:
106
+ """Convert a maya array to a numpy array
107
+
108
+ Parameters
109
+ ----------
110
+ ary : MArray
111
+ The maya array to convert to a numpy array
112
+
113
+ Returns
114
+ -------
115
+ : np.array :
116
+ A numpy array that contains the data from mArray
117
+ """
118
+ if isinstance(mArray, om.MMatrix):
119
+ npArray, _ = _swigConnectMatrix(mArray, c_double)
120
+ elif isinstance(mArray, om.MFloatMatrix):
121
+ npArray, _ = _swigConnectMatrix(mArray, c_float)
122
+ else:
123
+ util = om.MScriptUtil()
124
+ count = mArray.length()
125
+ npArray, _ = _swigConnect(mArray, count, util)
126
+ return np.copy(npArray)
127
+
128
+
129
+ T = TypeVar('T', bound=OMArrays)
130
+
131
+
132
+ def numpyToMaya(ary: np.ndarray, mType: type[T]) -> T:
133
+ """Convert a numpy array to a specific maya type array
134
+
135
+ Parameters
136
+ ----------
137
+ ary : np.array
138
+ The numpy array to convert to a maya array
139
+ mType : type
140
+ The maya type to convert to out of: MPointArray, MFloatPointArray, MVectorArray,
141
+ MFloatVectorArray, MDoubleArray, MFloatArray, MIntArray, MUintArray
142
+
143
+ Returns
144
+ -------
145
+ : mType :
146
+ An array of the provided type that contains the data from ary
147
+
148
+ """
149
+ # Handle matrices separately
150
+ if mType in (om.MMatrix, om.MFloatMatrix):
151
+ ctp = c_double if mType == om.MMatrix else c_float
152
+ if ary.shape != (4, 4):
153
+ msg = "Numpy array must have the proper shape. For matrix types that shape must be (4, 4). Got {0}"
154
+ raise ValueError(msg.format(ary.shape))
155
+ tmpMat = mType()
156
+ npArray, ptr = _swigConnectMatrix(tmpMat, ctp)
157
+ np.copyto(npArray, ary)
158
+ return mType(ptr)
159
+
160
+ # Add a little shape checking
161
+ comps = _CONVERT_DICT[mType][1]
162
+ if comps == 1:
163
+ if len(ary.shape) != 1:
164
+ raise ValueError("Numpy array must be 1D to convert to the given maya type")
165
+ else:
166
+ if len(ary.shape) != 2:
167
+ raise ValueError("Numpy array must be 2D to convert to the given maya type")
168
+ if ary.shape[1] != comps:
169
+ msg = "Numpy array must have the proper shape. Dimension 2 has size {0}, but needs size {1}"
170
+ raise ValueError(msg.format(ary.shape[1], comps))
171
+ count = ary.shape[0]
172
+ tmpAry = mType(count)
173
+ util = om.MScriptUtil()
174
+ npArray, ptr = _swigConnect(tmpAry, count, util)
175
+ np.copyto(npArray, ary)
176
+ return mType(ptr, count)
177
+
178
+
179
+ # fmt: off
180
+ _NTYPE_DICT = {
181
+ om.MFnNumericData.kInvalid: (om.MDataHandle.asDouble, om.MDataHandle.setDouble),
182
+ om.MFnNumericData.kFloat: (om.MDataHandle.asDouble, om.MDataHandle.setDouble),
183
+ om.MFnNumericData.kDouble: (om.MDataHandle.asDouble, om.MDataHandle.setDouble),
184
+ om.MFnNumericData.kByte: (om.MDataHandle.asInt, om.MDataHandle.setInt),
185
+ om.MFnNumericData.kChar: (om.MDataHandle.asChar, om.MDataHandle.setChar),
186
+ om.MFnNumericData.kShort: (om.MDataHandle.asShort, om.MDataHandle.setShort),
187
+ om.MFnNumericData.kInt: (om.MDataHandle.asInt, om.MDataHandle.setInt),
188
+ #om.MFnNumericData.kInt64: (om.MDataHandle.asInt, om.MDataHandle.setInt64),
189
+ om.MFnNumericData.kAddr: (om.MDataHandle.asInt, om.MDataHandle.setInt),
190
+ om.MFnNumericData.kLong: (om.MDataHandle.asInt, om.MDataHandle.setInt),
191
+ om.MFnNumericData.kBoolean: (om.MDataHandle.asBool, om.MDataHandle.setBool),
192
+
193
+ om.MFnNumericData.k2Short: (om.MDataHandle.asShort2, om.MDataHandle.set2Short),
194
+ om.MFnNumericData.k2Long: (om.MDataHandle.asInt2, om.MDataHandle.set2Int),
195
+ om.MFnNumericData.k2Int: (om.MDataHandle.asInt2, om.MDataHandle.set2Int),
196
+ om.MFnNumericData.k3Short: (om.MDataHandle.asShort3, om.MDataHandle.set3Short),
197
+ om.MFnNumericData.k3Long: (om.MDataHandle.asInt3, om.MDataHandle.set3Int),
198
+ om.MFnNumericData.k3Int: (om.MDataHandle.asInt3, om.MDataHandle.set3Int),
199
+ om.MFnNumericData.k2Float: (om.MDataHandle.asFloat2, om.MDataHandle.set2Float),
200
+ om.MFnNumericData.k2Double: (om.MDataHandle.asDouble2, om.MDataHandle.set2Double),
201
+ om.MFnNumericData.k3Float: (om.MDataHandle.asFloat3, om.MDataHandle.set3Float),
202
+ om.MFnNumericData.k3Double: (om.MDataHandle.asDouble3, om.MDataHandle.set3Double),
203
+ }
204
+
205
+ _DTYPE_DICT = {
206
+ om.MFn.kPointArrayData: (om.MFnPointArrayData, om.MPointArray),
207
+ om.MFn.kDoubleArrayData: (om.MFnDoubleArrayData, om.MDoubleArray),
208
+ om.MFn.kFloatArrayData: (om.MFnFloatArrayData, om.MFloatArray),
209
+ om.MFn.kIntArrayData: (om.MFnIntArrayData, om.MIntArray),
210
+ om.MFn.kUInt64ArrayData: (om.MFnUInt64ArrayData, om.MPointArray),
211
+ om.MFn.kVectorArrayData: (om.MFnVectorArrayData, om.MVectorArray),
212
+ }
213
+ # fmt: on
214
+
215
+
216
+ def getNumpyAttr(
217
+ attrName: om.MPlug | str,
218
+ ) -> np.ndarray | float | int | tuple[int, ...] | tuple[float, ...]:
219
+ """Read attribute data directly from the plugs into numpy
220
+
221
+ This function will read most numeric data types directly into numpy arrays
222
+ However, some simple data types (floats, vectors, etc...) have api accessors
223
+ that return python tuples. These will not be turned into numpy arrays.
224
+ And really, if you're getting simple data like that, just use cmds.getAttr
225
+
226
+ Parameters
227
+ ----------
228
+ attrName : str or om.MPlug
229
+ The name of the attribute to get (For instance "pSphere2.translate", or "group1.pim[0]")
230
+ Or the MPlug itself
231
+
232
+ Returns
233
+ -------
234
+ : object :
235
+ The numerical data from the provided plug. A np.array, float, int, or tuple
236
+
237
+ """
238
+ if isinstance(attrName, str):
239
+ sl = om.MSelectionList()
240
+ sl.add(attrName)
241
+ plug = om.MPlug()
242
+ sl.getPlug(0, plug)
243
+ elif isinstance(attrName, om.MPlug):
244
+ plug = attrName
245
+ else:
246
+ raise ValueError("AttrName is not a name or a plug")
247
+
248
+ # First just check if the data is numeric
249
+ mdh = plug.asMDataHandle()
250
+ if mdh.isNumeric():
251
+ # So, at this point, you should really just use getattr
252
+ ntype = mdh.numericType()
253
+ if ntype in _NTYPE_DICT:
254
+ return _NTYPE_DICT[ntype][0](mdh)
255
+ elif ntype == om.MFnNumericData.k4Double:
256
+ NotImplementedError("Haven't implemented double4 access yet")
257
+ else:
258
+ raise RuntimeError(
259
+ "I don't know how to access data from the given attribute"
260
+ )
261
+ else:
262
+ # The data is more complex than a simple number.
263
+ try:
264
+ pmo = plug.asMObject()
265
+ except RuntimeError as e:
266
+ # raise a more descriptive error. And make sure to actually print the plug name
267
+ raise RuntimeError(
268
+ "I don't know how to access data from the given attribute"
269
+ ) from e
270
+ apiType = pmo.apiType()
271
+
272
+ # A list of types that I can just pass to mayaToNumpy
273
+ if apiType in _DTYPE_DICT:
274
+ fn, dtype = _DTYPE_DICT[apiType]
275
+ fnPmo = fn(pmo)
276
+ ary = fnPmo.array()
277
+ return mayaToNumpy(ary)
278
+
279
+ elif apiType == om.MFn.kComponentListData:
280
+ fnPmo = om.MFnComponentListData(pmo)
281
+ mirs = []
282
+ mir = om.MIntArray()
283
+ for attrIndex in range(fnPmo.length()):
284
+ fnEL = om.MFnSingleIndexedComponent(fnPmo[attrIndex])
285
+ fnEL.getElements(mir)
286
+ mirs.append(mayaToNumpy(mir))
287
+ if not mirs:
288
+ return np.array([], dtype=int)
289
+ return np.concatenate(mirs)
290
+
291
+ elif apiType == om.MFn.kMatrixData:
292
+ fnPmo = om.MFnMatrixData(pmo)
293
+ mat = fnPmo.matrix()
294
+ return mayaToNumpy(mat)
295
+ else:
296
+ apiTypeStr = pmo.apiTypeStr()
297
+ raise NotImplementedError(f"I don't know how to handle {apiTypeStr} yet")
298
+ raise NotImplementedError("Fell all the way through")
299
+
300
+
301
+ def setNumpyAttr(
302
+ attrName: str | om.MPlug,
303
+ value: np.ndarray | float | int | tuple[int, ...] | tuple[float, ...],
304
+ ) -> None:
305
+ """Write a numpy array directly into a maya plug
306
+
307
+ This function will handle most numeric plug types.
308
+ But for single float, individual point, etc.. types, consider using cmds.setAttr
309
+
310
+ THIS DOES NOT SUPPORT UNDO
311
+
312
+ Parameters
313
+ ----------
314
+ attrName : str or om.MPlug
315
+ The name of the attribute to get (For instance "pSphere2.translate", or "group1.pim[0]")
316
+ Or the MPlug itself
317
+ value : int, float, tuple, np.array
318
+ The correctly typed value to set on the attribute
319
+ """
320
+ if isinstance(attrName, str):
321
+ sl = om.MSelectionList()
322
+ sl.add(attrName)
323
+ plug = om.MPlug()
324
+ sl.getPlug(0, plug)
325
+ elif isinstance(attrName, om.MPlug):
326
+ plug = attrName
327
+ else:
328
+ raise ValueError(f"Data must be string or MPlug. Got {type(attrName)}")
329
+
330
+ # First just check if the data is numeric
331
+ mdh = plug.asMDataHandle()
332
+ if mdh.isNumeric():
333
+ # So, at this point, you should really just use setattr
334
+ ntype = mdh.numericType()
335
+ if ntype in _NTYPE_DICT:
336
+ assert isinstance(value, tuple)
337
+ _NTYPE_DICT[ntype][1](mdh, *value)
338
+ plug.setMObject(mdh.data())
339
+ elif ntype == om.MFnNumericData.k4Double:
340
+ NotImplementedError("Haven't implemented double4 access yet")
341
+ else:
342
+ raise RuntimeError("I don't know how to set data on the given attribute")
343
+ else:
344
+ # The data is more complex than a simple number.
345
+ try:
346
+ pmo = plug.asMObject()
347
+ except RuntimeError as e:
348
+ # raise a more descriptive error. And make sure to actually print the plug name
349
+ raise RuntimeError(
350
+ "I don't know how to access data from the given attribute"
351
+ ) from e
352
+ apiType = pmo.apiType()
353
+
354
+ if apiType in _DTYPE_DICT:
355
+ # build the pointArrayData
356
+ fnType, mType = _DTYPE_DICT[apiType]
357
+ fn = fnType()
358
+ assert isinstance(value, np.ndarray)
359
+ mPts = numpyToMaya(value, mType)
360
+ dataObj = fn.create(mPts)
361
+ plug.setMObject(dataObj)
362
+ return
363
+
364
+ elif apiType == om.MFn.kComponentListData:
365
+ fnCompList = om.MFnComponentListData()
366
+ compList = fnCompList.create()
367
+ fnIdx = om.MFnSingleIndexedComponent()
368
+ idxObj = fnIdx.create(om.MFn.kMeshVertComponent)
369
+ assert isinstance(value, np.ndarray)
370
+ mIdxs = numpyToMaya(value, om.MIntArray)
371
+ fnIdx.addElements(mIdxs)
372
+ fnCompList.add(idxObj)
373
+ plug.setMObject(compList)
374
+ return
375
+ else:
376
+ apiTypeStr = pmo.apiTypeStr()
377
+ raise NotImplementedError(f"I don't know how to handle {apiTypeStr} yet")
378
+
379
+ raise NotImplementedError("WTF? How did you get here??")
380
+
381
+
382
+ ################################################################################
383
+
384
+
385
+ def test() -> None:
386
+ import time
387
+
388
+ from maya import cmds
389
+
390
+ meshName = "pSphere1"
391
+ bsName = "blendShape1"
392
+ meshIdx = 0
393
+ bsIdx = 0
394
+
395
+ # A quick test showing how to build a numpy array
396
+ # containing the deltas for a shape on a blendshape node
397
+ numVerts = cmds.polyEvaluate(meshName, vertex=True)
398
+ baseAttr = f"{bsName}.it[{meshIdx}].itg[{bsIdx}].iti[6000]"
399
+ inPtAttr = baseAttr + ".inputPointsTarget"
400
+ inCompAttr = baseAttr + ".inputComponentsTarget"
401
+
402
+ start = time.time()
403
+ points = getNumpyAttr(inPtAttr)
404
+ idxs = getNumpyAttr(inCompAttr)
405
+ ret = np.zeros((numVerts, 4))
406
+ ret[idxs] = points
407
+ end = time.time()
408
+
409
+ print("IDXS", idxs.shape)
410
+ print("OUT", points.shape)
411
+ print("RET", ret.shape)
412
+ print("TOOK", end - start)
413
+
414
+
415
+ if __name__ == "__main__":
416
+ test()