def test_bz_numpy():
    "polyprism.bz cython vs numpy implementation"
    cy = polyprism.bz(xp, yp, zp, model)
    py = _polyprism_numpy.bz(xp, yp, zp, model)
    diff = np.abs(py - cy)
    assert np.all(diff <= precision_mag), 'max diff: %g' % (max(diff))
Пример #2
0
def test_bz_numpy():
    "polyprism.bz cython vs numpy implementation"
    cy = polyprism.bz(xp, yp, zp, model)
    py = _polyprism_numpy.bz(xp, yp, zp, model)
    diff = np.abs(py - cy)
    assert np.all(diff <= precision_mag), 'max diff: %g' % (max(diff))
def test_bz():
    "polyprism.bz against prism"
    resprism = prism.bz(xp, yp, zp, prismmodel)
    respoly = polyprism.bz(xp, yp, zp, model)
    diff = np.abs(resprism - respoly)
    assert np.all(diff <= precision_mag), 'max diff: %g' % (max(diff))
Пример #4
0
def test_bz():
    "polyprism.bz against prism"
    resprism = prism.bz(xp, yp, zp, prismmodel)
    respoly = polyprism.bz(xp, yp, zp, model)
    diff = np.abs(resprism - respoly)
    assert np.all(diff <= precision_mag), 'max diff: %g' % (max(diff))