ref: a4cc8e5d1443807ed8afb91b90349282cbbb14ce
dir: /python/tests/utils.py/
#! /usr/bin/env python
def array_from_text_file(filename, dtype = 'float'):
import os.path
from numpy import array
filename = os.path.join(os.path.dirname(__file__), filename)
return array([line.split() for line in open(filename).readlines()],
dtype = dtype)