emsig / empymod

Full 3D electromagnetic modeller for 1D VTI media
https://empymod.emsig.xyz
Apache License 2.0
85 stars 22 forks source link

MAINT: Fix failing tests #171

Closed prisae closed 2 years ago

prisae commented 2 years ago

Currently, almost all tests fail. I cannot reproduce the failure locally.

This needs fixing before the next release!

prisae commented 2 years ago
import numpy as np

def test_print_data():
    a = 1635.984429995926
    b = 1519.292431702289
    spacing = np.log(a)-np.log(b)
    shift = np.log(a)-spacing*100
    print(np.log(a), np.log(b), spacing, shift)
    assert "1.509903313e-14" == f"{shift:1.10g}"

# Local / until now
# 7.3999999999999995 7.326 0.07399999999999984 1.509903313490213e-14

# New on GHA
# 7.3999999999999995 7.325999999999999 0.07400000000000073 -7.37188088351104e-14
prisae commented 2 years ago

https://github.com/numpy/numpy/issues/21859

prisae commented 2 years ago

Rethinking this: There is a need to improve how spacing and shift are calculated. Particularly shift.

prisae commented 2 years ago

Will be fixed in #172