pydcf icon indicating copy to clipboard operation
pydcf copied to clipboard

lag range integer/float parsing mismatch?

Open sophiarubens opened this issue 2 years ago • 0 comments

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.

sophiarubens avatar Jun 13 '23 20:06 sophiarubens