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