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

lag range integer/float parsing mismatch? #3

Open
sophiarubens opened this issue Jun 13, 2023 · 0 comments
Open

lag range integer/float parsing mismatch? #3

sophiarubens opened this issue Jun 13, 2023 · 0 comments

Comments

@sophiarubens
Copy link

In order for pydcf to run, I had to force the user input to be an integer---even though I entered integers for the lag_range_low and lag_range_high, for some reason they were scanned as floats (np.float64, to be more specific). Perhaps this is some incompatibility between pydcf (in the readme, stated to be compatible with Python 2.7, 3.4, 3.5) and newer versions of Python (I've been using 3.11).

Here are the changes (to lines 331-333) that worked for me:
DT = int(OPTS.dt[0])
N = int(np.around((OPTS.lgh[0] - OPTS.lgl[0]) / float(DT)))
T = np.linspace(int(OPTS.lgl[0]+(DT/2.0)), int(OPTS.lgh[0]-(DT/2.0)), N)

Not sure if some python environment weirdness means this is just a personal issue or if others have run into it, but I wanted to at least point it out in the off chance that others have run into issues computing DCFs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant