Issue #1059: Enzo nuclei density does not precisely equal sum of species densities in python 3 (yt_analysis/yt)
New issue 1059: Enzo nuclei density does not precisely equal sum of species densities in python 3 https://bitbucket.org/yt_analysis/yt/issues/1059/enzo-nuclei-density-does-no... Nathan Goldbaum: John ZuHone offers this repro script that illustrates the issue: ``` #!python 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 from __future__ import print_function import yt from yt.testing import assert_array_equal import numpy as np from IPython import embed ecp = "enzo_cosmology_plus/DD0046/DD0046" ds = yt.load(ecp) dd = ds.all_data() a = dd["He_nuclei_density"] b = dd["He_number_density"] + dd["He_p1_number_density"] + dd["He_p2_number_density"] err = np.abs(a-b)/a print(np.max(err)) assert_array_equal(a,b) ``` This is currently causing one of the Enzo answer tests to fail on python3.
participants (1)
-
Nathan Goldbaum