Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyEXP TblData evaluation seems garbled #59

Closed
michael-petersen opened this issue Dec 15, 2023 · 2 comments
Closed

pyEXP TblData evaluation seems garbled #59

michael-petersen opened this issue Dec 15, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@michael-petersen
Copy link
Member

When I run the following code:

coefsread = pyEXP.coefs.Coefs.factory('coef1.txt')
C = coefsread.getAllCoefs()
print(C[1,:])

coefsread = pyEXP.coefs.Coefs.factory('coef1.txt')
C = coefsread.getAllCoefs()
print(C[1,:])

I get

---- Coefs::factory: error opening as HDF5, trying EXP native and ascii table
---- Coefs::factory: read ascii and created TableData
[6.43503391e-08 5.98943807e-08 6.66737480e-08 6.90625039e-08
 7.15178637e-08 7.40412731e-08 7.66340220e-08 7.92974728e-08
 8.20330039e-08 8.48420093e-08 0.00000000e+00]
---- Coefs::factory: error opening as HDF5, trying EXP native and ascii table
---- Coefs::factory: read ascii and created TableData
[6.20909780e-08 6.43503391e-08 6.66737480e-08 6.90625039e-08
 7.15178637e-08 7.40412731e-08 7.66340220e-08 7.92974728e-08
 8.20330039e-08 8.48420093e-08 0.00000000e+00]

i.e. different results for the same file (when they should be the same). Given that some of the values are the same, I suspect an addressing/fencepost/memory issue somewhere. Some additional details:

  • If the factory call is not made again, this behaviour is not seen (i.e. repeated calls to getAllCoefs() is not a problem)
  • The first column (i.e. C[0,:]) is never corrupted

Is this reproducible for others?

In this example, coef1.txt is

0.0 5.989438071816292e-08 1.7521875701449447e-07 3.9311880010652795e-07 7.53369789956869e-07 1.2751284622875935e-06 
1.0 6.209097800900433e-08 1.8154483036637094e-07 4.070318022256943e-07 7.793656989784116e-07 1.3177604283519646e-06 
2.0 6.435033914548556e-08 1.8804753707487184e-07 4.2132141142163527e-07 8.060373687770234e-07 1.3614357663063152e-06 
3.0 6.6673747957078e-08 1.9473013728275417e-07 4.359940131048028e-07 8.333949731692655e-07 1.4061784948108052e-06 
4.0 6.906250388877457e-08 2.015961249825961e-07 4.5105661980662236e-07 8.614500869788951e-07 1.452001928641754e-06 
5.0 7.151786373387439e-08 2.0864903203324786e-07 4.6651630858432454e-07 8.90214365388944e-07 1.498922133315071e-06 
6.0 7.404127307599703e-08 2.1589242819040464e-07 4.823802208392562e-07 9.196995431536603e-07 1.5469552318864821e-06 
7.0 7.663402198200968e-08 2.2332992113495078e-07 4.986555621305018e-07 9.499174338041825e-07 1.5961174030538262e-06 
8.0 7.929747283965667e-08 2.3096515649909962e-07 5.153496019838852e-07 9.808799288481356e-07 1.6464248792582182e-06 
9.0 8.203300389017387e-08 2.3880181789034833e-07 5.32469673696419e-07 1.0125989969633122e-06 1.6978939447843994e-06 
10.0 8.484200927363003e-08 2.468436269132721e-07 5.500231741362771e-07 1.0450866831856246e-06 1.7505409338606263e-06 
@michael-petersen michael-petersen added the bug Something isn't working label Dec 15, 2023
@The9Cat
Copy link
Contributor

The9Cat commented Dec 15, 2023

This really helps. Not sure what's up yet, but this should be enough for me to find it.

@michael-petersen
Copy link
Member Author

Sorted in #58 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants