source:
python/lib/aubio/__init__.py
@
4fe62ba
Last change on this file since 4fe62ba was 229d050, checked in by , 12 years ago | |
---|---|
|
|
File size: 408 bytes |
Rev | Line | |
---|---|---|
[229d050] | 1 | #! /usr/bin/env python |
2 | ||
[ccca7cb] | 3 | import numpy |
[4c01c0f] | 4 | from _aubio import * |
[33102ab] | 5 | from midiconv import * |
[ccca7cb] | 6 | |
7 | class fvec(numpy.ndarray): | |
[229d050] | 8 | " a simple numpy array holding a vector of float32 " |
[ccca7cb] | 9 | def __new__(self, length = 1024, **kwargs): |
[229d050] | 10 | self.length = length |
[d836c21] | 11 | if type(length) == type([]): |
12 | return numpy.array(length, dtype='float32', **kwargs) | |
13 | return numpy.zeros(length, dtype='float32', **kwargs) |
Note: See TracBrowser
for help on using the repository browser.