[fmat] workaround to allow printing 'fake' fmat created from tensors
authorPaul Brossier <piem@piem.org>
Tue, 29 Jan 2019 02:30:59 +0000 (03:30 +0100)
committerPaul Brossier <piem@piem.org>
Wed, 29 Dec 2021 16:52:02 +0000 (11:52 -0500)
src/fmat.c

index 62c48c5..dd4060f 100644 (file)
@@ -77,7 +77,7 @@ void fmat_print(const fmat_t *s) {
   uint_t i,j;
   for (i=0; i< s->height; i++) {
     for (j=0; j< s->length; j++) {
-      AUBIO_MSG(AUBIO_SMPL_FMT " ", s->data[i][j]);
+      AUBIO_MSG(AUBIO_SMPL_FMT " ", s->data[0][i * s->length + j]);
     }
     AUBIO_MSG("\n");
   }