Fixes #23 - Preserving the order of samples in subdata.

This commit is contained in:
Einar Ryeng 2011-03-08 09:27:06 +00:00
parent ed486ddf2e
commit 11fc34b1e3

View File

@ -298,7 +298,8 @@ class Dataset(object):
"""
ds = self.copy()
indices = ds.get_indices(dim, idents)
indices = array_sort(ds.get_indices(dim, idents))
idents = ds.get_identifiers(dim, indices=indices)
if not idents:
raise ValueError("No of identifers from: \n%s \nfound in %s" %(str(idents), ds._name))