Showing the changes to python/ext (1 of 2 files). Show all
Unified · Split
| @@ -121,6 +121,13 @@ Py_fft_rdo(Py_fft * self, PyObject * args) · 120 unmodified lines | ||
| 121 | 121 | return NULL; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | + if (self->cvecin.length != self->win_s / 2 + 1) { | |
| 125 | + PyErr_Format(PyExc_ValueError, | |
| 126 | + "input array has length %d, but fft input has size %d", | |
| 127 | + self->vecin.length, self->win_s / 2 + 1); | |
| 128 | + return NULL; | |
| 129 | + } | |
| 130 | + | |
| 124 | 131 | fvec_t out; |
| 125 | 132 | Py_INCREF(self->rdoout); |
| 126 | 133 | if (!PyAubio_ArrayToCFvec(self->rdoout, &out) ) { |