Changeset 143682b
- Timestamp:
- May 10, 2016, 9:37:37 PM (9 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 8fb567c
- Parents:
- 016813e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/aubio/__init__.py
r016813e r143682b 7 7 8 8 class fvec(numpy.ndarray): 9 """a simple numpy array holding a vector of %s""" % float_type9 """a numpy vector holding audio samples""" 10 10 11 def __new__( self, length =1024, **kwargs):12 self.length = length13 if type(length) == type([]):14 return numpy.array(length, dtype = float_type, **kwargs)15 return numpy.zeros(length, dtype =float_type, **kwargs)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 TracChangeset
for help on using the changeset viewer.