コード例 #1
0
def test_gxx():
    "gravmag.prism.gxx python vs cython implementation"
    py = _prism.gxx(xp, yp, zp, model)
    cy = _cprism.gxx(xp, yp, zp, model)
    diff = np.abs(py - cy)
    assert np.all(diff <= precision), 'max diff: %g' % (max(diff))
コード例 #2
0
def test_gxx():
    "gravmag.prism.gxx python vs cython implementation"
    py = _prism.gxx(xp, yp, zp, model)
    cy = _cprism.gxx(xp, yp, zp, model)
    diff = np.abs(py - cy)
    assert np.all(diff <= precision), 'max diff: %g' % (max(diff))
コード例 #3
0
def test_gxx_ne():
    "gravmag.prism.gxx python vs numexpr implementation"
    py = _prism.gxx(xp, yp, zp, model)
    ne = _neprism.gxx(xp, yp, zp, model)
    diff = np.abs(py - ne)
    assert np.all(diff <= precision), 'max diff: %g' % (max(diff))
コード例 #4
0
def test_gxx_ne():
    "gravmag.prism.gxx python vs numexpr implementation"
    py = _prism.gxx(xp, yp, zp, model)
    ne = _neprism.gxx(xp, yp, zp, model)
    diff = np.abs(py - ne)
    assert np.all(diff <= precision), 'max diff: %g' % (max(diff))