Changeset f603b57


Ignore:
Timestamp:
Oct 8, 2009, 2:10:10 AM (15 years ago)
Author:
Paul Brossier <piem@piem.org>
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:
2672d67
Parents:
cc9d0cc
Message:

tests/python: update template.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/python/template.py

    rcc9d0cc rf603b57  
    11import unittest
     2from numpy import array
    23
    34class aubio_unit_template(unittest.TestCase):
     5  """ a class derivated from unittest.TestCase """
    46 
    57  def assertCloseEnough(self, first, second, places=5, msg=None):
     
    1618        raise self.failureException, \
    1719              (msg or '%r != %r within %r places' % (first, second, places))
     20
     21def array_from_text_file(filename, dtype = 'float'):
     22  return array([line.split() for line in open(filename).readlines()],
     23      dtype = dtype)
Note: See TracChangeset for help on using the changeset viewer.