def test_by_numpy():
    "polyprism.by cython vs numpy implementation"
    cy = polyprism.by(xp, yp, zp, model)
    py = _polyprism_numpy.by(xp, yp, zp, model)
    diff = np.abs(py - cy)
    assert np.all(diff <= precision_mag), 'max diff: %g' % (max(diff))
Example #2
0
def test_by_numpy():
    "polyprism.by cython vs numpy implementation"
    cy = polyprism.by(xp, yp, zp, model)
    py = _polyprism_numpy.by(xp, yp, zp, model)
    diff = np.abs(py - cy)
    assert np.all(diff <= precision_mag), 'max diff: %g' % (max(diff))
def test_by():
    "polyprism.by against prism"
    resprism = prism.by(xp, yp, zp, prismmodel)
    respoly = polyprism.by(xp, yp, zp, model)
    diff = np.abs(resprism - respoly)
    assert np.all(diff <= precision_mag), 'max diff: %g' % (max(diff))
Example #4
0
def test_by():
    "polyprism.by against prism"
    resprism = prism.by(xp, yp, zp, prismmodel)
    respoly = polyprism.by(xp, yp, zp, model)
    diff = np.abs(resprism - respoly)
    assert np.all(diff <= precision_mag), 'max diff: %g' % (max(diff))