feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since 1e4d90f was
143682b,
checked in by Paul Brossier <piem@piem.org>, 8 years ago
|
python/lib/aubio/init.py: clean up, use isinstance
|
-
Property mode set to
100644
|
File size:
423 bytes
|
Rev | Line | |
---|
[229d050] | 1 | #! /usr/bin/env python |
---|
| 2 | |
---|
[ccca7cb] | 3 | import numpy |
---|
[4de5f35] | 4 | from ._aubio import * |
---|
| 5 | from .midiconv import * |
---|
| 6 | from .slicing import * |
---|
[ccca7cb] | 7 | |
---|
| 8 | class fvec(numpy.ndarray): |
---|
[143682b] | 9 | """a numpy vector holding audio samples""" |
---|
[8bffcff] | 10 | |
---|
[143682b] | 11 | def __new__(cls, input_arg=1024, **kwargs): |
---|
| 12 | if isinstance(input_arg, int): |
---|
| 13 | return numpy.zeros(input_arg, dtype=float_type, **kwargs) |
---|
| 14 | else: |
---|
| 15 | return numpy.array(input_arg, dtype=float_type, **kwargs) |
---|
Note: See
TracBrowser
for help on using the repository browser.