Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -85,6 +85,13 @@ Py_fft_do(Py_fft * self, PyObject * args) · 84 unmodified lines | ||
| 85 | 85 | return NULL; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | + if (self->vecin.length != self->win_s) { | |
| 89 | + PyErr_Format(PyExc_ValueError, | |
| 90 | + "input array has length %d, but fft has size %d", | |
| 91 | + self->vecin.length, self->win_s); | |
| 92 | + return NULL; | |
| 93 | + } | |
| 94 | + | |
| 88 | 95 | cvec_t c_out; |
| 89 | 96 | Py_INCREF(self->doout); |
| 90 | 97 | if (!PyAubio_PyCvecToCCvec(self->doout, &c_out)) { |