Skip to content
Snippets Groups Projects

Resolve "[fix] fix bug "IndexError: index 1 is out of bounds" when generating multi channel images"

3 files
+ 39
2
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -306,7 +306,6 @@ class AISTrajectory(AISPoints):
else:
bounds = []
if type(features) is list:
nb_channels = len(features)
features_vectors = self.df[features].to_numpy()
for c in features_vectors.T:
bounds.append((0, max(c)))
@@ -319,6 +318,8 @@ class AISTrajectory(AISPoints):
features_vectors = self.df[features.keys()].to_numpy()
else:
raise TypeError("Type not supported")
nb_channels = len(features_vectors.T)
data = np.zeros((height, width, nb_channels), dtype=np.float)
Loading