Changeset b96a7b8


Ignore:
Timestamp:
May 11, 2016, 9:40:04 AM (4 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
88554b9
Parents:
0df6e9e
Message:

python/lib/aubio/init.py: make sure length is not zero and float_type is imported

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/aubio/__init__.py

    r0df6e9e rb96a7b8  
    33import numpy
    44from ._aubio import *
     5from ._aubio import float_type
    56from .midiconv import *
    67from .slicing import *
     
    1112    def __new__(cls, input_arg=1024, **kwargs):
    1213        if isinstance(input_arg, int):
     14            if input_arg == 0:
     15                raise ValueError("vector length of 1 or more expected")
    1316            return numpy.zeros(input_arg, dtype=float_type, **kwargs)
    1417        else:
Note: See TracChangeset for help on using the changeset viewer.