You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was confident I had done this successfully ~ a year ago, but this fails in WrightTools 3.4.4 and 3.4.6.
Guessing something the slice inside the transpose:
`
File "C:\Users\David Lafayette\miniconda3\lib\site-packages\WrightTools\data_join.py", line 262, in join
combine(data, out, channel_name, new_idx, transpose, slice_)
File "C:\Users\David Lafayette\miniconda3\lib\site-packages\WrightTools\data_join.py", line 199, in combine
vals[valid_index] = old[:].transpose(transpose)[slice_]
ValueError: axes don't match array
`
The text was updated successfully, but these errors were encountered:
DLafayetteII
changed the title
wt.data.join does not work if any pieces are a single point
wt.data.join does not work if any individual piece being joined is a single point
Jan 4, 2023
The issue arises from lines 245 - 250 of _join.py. np.ndim() of the 1 point variable returns a dimensionality of zero (np.ndim(d1.freq.points) = 0). Therefore, nothing is appended to the transpose, and an empty transpose (transpose = []) is passed to the combine method (If instead transpose = [0], the combine and join methods work as intended).
I'll propose a fix for the issue but I'm not sure I understand the initial intention of what should be done with 'scalar' (single-value) variables. There is a comment on line 248 about the transpose being unnecessary for scalar variables, but we pass the transpose to the combine method regardless of whether the variable is scalar.
test.txt
I was confident I had done this successfully ~ a year ago, but this fails in WrightTools 3.4.4 and 3.4.6.
Guessing something the slice inside the transpose:
`
File "C:\Users\David Lafayette\miniconda3\lib\site-packages\WrightTools\data_join.py", line 262, in join
combine(data, out, channel_name, new_idx, transpose, slice_)
File "C:\Users\David Lafayette\miniconda3\lib\site-packages\WrightTools\data_join.py", line 199, in combine
vals[valid_index] = old[:].transpose(transpose)[slice_]
ValueError: axes don't match array
`
The text was updated successfully, but these errors were encountered: