def test_kernelzz_numpy(): "polyprism.kernelzz cython vs numpy implementation" for p in model: cy = polyprism.kernelzz(xp, yp, zp, p) py = _polyprism_numpy.kernelzz(xp, yp, zp, p) diff = np.abs(py - cy) assert np.all(diff <= precision), 'max diff: %g' % (max(diff))
def test_kernelzz(): "polyprism.kernelzz against prism" for pris, poly in zip(prismmodel, model): resprism = prism.kernelzz(xp, yp, zp, pris) respoly = polyprism.kernelzz(xp, yp, zp, poly) diff = np.abs(resprism - respoly) assert np.all(diff <= precision), \ 'max diff: %g' % (max(diff))