Projects/laydi
Projects
/
laydi
Archived
7
0
Fork 0
This commit is contained in:
Arnar Flatberg 2008-01-07 12:44:08 +00:00
parent ca267920d8
commit e6625c975f
1 changed files with 5 additions and 3 deletions

View File

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