(x)
| 13 | |
| 14 | |
| 15 | def midpoints(x): |
| 16 | sl = () |
| 17 | for i in range(x.ndim): |
| 18 | x = (x[sl + np.index_exp[:-1]] + x[sl + np.index_exp[1:]]) / 2.0 |
| 19 | sl += np.index_exp[:] |
| 20 | return x |
| 21 | |
| 22 | # prepare some coordinates, and attach rgb values to each |
| 23 | r, theta, z = np.mgrid[0:1:11j, 0:np.pi*2:25j, -0.5:0.5:11j] |
no outgoing calls
no test coverage detected
searching dependent graphs…