Skip to content

Commit

Permalink
output list not array
Browse files Browse the repository at this point in the history
  • Loading branch information
rabitt committed Jan 8, 2017
1 parent 424585d commit 01b9137
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions medleydb/utils.py
Expand Up @@ -165,8 +165,8 @@ def artist_conditional_split(trackid_list=None, test_size=0.15, num_splits=5,
splits = []
for train, test in splitter:
splits.append({
'train': trackid_array[train],
'test': trackid_array[test]
'train': list(trackid_array[train]),
'test': list(trackid_array[test])
})

return splits
Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils.py
Expand Up @@ -119,7 +119,7 @@ def test_trackid_list(self):
self.assertEqual(1, len(splits))
self.assertEqual(
sorted(trackid_list),
sorted(list(splits[0]['train']) + list(splits[0]['test']))
sorted(splits[0]['train'] + splits[0]['test'])
)

def test_artist_index(self):
Expand All @@ -146,6 +146,6 @@ def test_artist_index(self):
self.assertEqual(1, len(splits))
self.assertEqual(
sorted(trackid_list),
sorted(list(splits[0]['train']) + list(splits[0]['test']))
sorted(splits[0]['train'] + splits[0]['test'])
)

0 comments on commit 01b9137

Please sign in to comment.