def set_type2000_format(format=list):
"""
Sets the data format returned when reading in type 2000 files.
The default is 'list', meaning a list of NumPy arrays, where the
length of each array is equal to the frame size. To return type 2000
data as a 2-d array, <format> should be 'numpy.ndarray', e.g.:
import bluefile, numpy
bluefile.set_type2000_format(numpy.ndarray)
Note that <format> is expected to a type object.
"""
global _type2000_format
if format not in [ list, numpy.ndarray ]:
raise TypeError, 'Only list and numpy.ndarray are supported'
_type2000_format = format
评论列表
文章目录