Open mars20 opened 4 years ago
I think I've encountered another bug with this Python3 version when using the 'average2' alignment. I got a:
“TypeError: object of type 'int' has no len()” from line 595 of icoshift.py:
if len(ref_w) == 0 or ref_w.shape[0] == 0:
The error was fixed by changing "len(ref_w)" to "ref_w".
I'm rather new to github, so not entirely sure how I branch/merge this fix.
Your code seems to work. The only bug I found was this (not sure if it's a bug tbh)
In line 678. Instead of
ind_blocks = numpy.array([0, numpy.cumsum(ind_blocks, 0)], dtype=ind_blocks.dtype).flatten()
Making 0 a numpy array works for me.
numpy.array([numpy.array([0]),numpy.cumsum(ind_blocks, 0)], dtype=ind_blocks.dtype).flatten()
I feel the variable names need to be changed throughout the script.
Updated the code to make it compatible with Python3 test_wine.py is a simple test program