diff --git a/py/cy_vysmaw.pyx b/py/cy_vysmaw.pyx index 0178e46..b91ae91 100644 --- a/py/cy_vysmaw.pyx +++ b/py/cy_vysmaw.pyx @@ -540,9 +540,11 @@ cdef class ValidBufferMessage(Message): @property def spectrum(self): - n = (self._c_message[0].content.valid_buffer.buffer_size - - VYS_SPECTRUM_OFFSET) / sizeof(float) - return self._c_message[0].content.valid_buffer.spectrum + n = int((self._c_message[0].content.valid_buffer.buffer_size + - VYS_SPECTRUM_OFFSET) / sizeof(float)) + cdef float[:] result = \ + self._c_message[0].content.valid_buffer.spectrum + return result cdef class IdFailureMessage(Message):