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