(array, matrix)
| 18 | import math |
| 19 | |
| 20 | def _dotProduct(array, matrix): |
| 21 | output = [] |
| 22 | for pt in array: |
| 23 | if not output: |
| 24 | assert len(pt) == len(matrix) == len(matrix[0]) |
| 25 | outPt = [] |
| 26 | for i in range(len(pt)): |
| 27 | t = 0 |
| 28 | for j, c in enumerate(pt): |
| 29 | t += c * matrix[j][i] |
| 30 | outPt.append(t) |
| 31 | output.append(tuple(outPt)) |
| 32 | return tuple(output) |
| 33 | |
| 34 | def _offsetArray3D(array, offset): |
| 35 | dx, dy, dz = offset |
no test coverage detected