This commit is contained in:
Arnar Flatberg 2008-01-07 12:44:08 +00:00
parent ca267920d8
commit e6625c975f

View File

@ -581,16 +581,18 @@ def read_ftsv(fd, sep=None):
if type == 'category':
if sp_format:
matrix = sparse.lil_matrix(dim_lengths)
read_elements = _read_sparse_elements
else:
matrix = empty(dim_lengths, dtype='i')
read_elements = _read_elements
elif type == 'network':
matrix = empty(dim_lengths)
else:
matrix = empty(dim_lengths)
if sp_format:
matrix = _read_sparse_elements(fd, matrix)
else:
matrix = _read_elements(fd, matrix)
matrix = read_elements(fd, matrix, sep)
# Create dataset of specified type
if type == 'category':