def test_gz():
    "gravmag.prism.gz python vs cython implementation"
    py = _prism.gz(xp, yp, zp, model)
    cy = _cprism.gz(xp, yp, zp, model)
    diff = np.abs(py - cy)
    assert np.all(diff <= precision), 'max diff: %g' % (max(diff))
Example #2
0
def test_gz():
    "gravmag.prism.gz python vs cython implementation"
    py = _prism.gz(xp, yp, zp, model)
    cy = _cprism.gz(xp, yp, zp, model)
    diff = np.abs(py - cy)
    assert np.all(diff <= precision), 'max diff: %g' % (max(diff))
def test_gz_ne():
    "gravmag.prism.gz python vs numexpr implementation"
    py = _prism.gz(xp, yp, zp, model)
    ne = _neprism.gz(xp, yp, zp, model)
    diff = np.abs(py - ne)
    assert np.all(diff <= precision), 'max diff: %g' % (max(diff))
Example #4
0
def test_gz_ne():
    "gravmag.prism.gz python vs numexpr implementation"
    py = _prism.gz(xp, yp, zp, model)
    ne = _neprism.gz(xp, yp, zp, model)
    diff = np.abs(py - ne)
    assert np.all(diff <= precision), 'max diff: %g' % (max(diff))