Skip to content

Commit 76023db

Browse files
fantessileht
authored andcommitted
fix(csvts/torch): allow to read csv timeserie directly from query
1 parent d6749d0 commit 76023db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backends/torch/torchinputconns.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -1049,8 +1049,9 @@ namespace dd
10491049
std::vector<at::Tensor> label_sequence;
10501050

10511051
tstart = seq.size() - _timesteps;
1052-
_ids.push_back(_fnames[vecindex] + " #" + std::to_string(tstart)
1053-
+ "_" + std::to_string(tstart + _timesteps - 1));
1052+
if (_fnames.size() > static_cast<unsigned int>(vecindex))
1053+
_ids.push_back(_fnames[vecindex] + " #" + std::to_string(tstart)
1054+
+ "_" + std::to_string(tstart + _timesteps - 1));
10541055
for (int ti = tstart; ti < tstart + _timesteps; ++ti)
10551056
{
10561057
std::vector<double> datavec;

0 commit comments

Comments
 (0)