Home | Trees | Indices | Help |
|
---|
|
1 '''Tests for the dataset implementation''' 2 import numpy as N 3 4 from numpy.testing import assert_array_equal 5 from nose.tools import ok_ 6 7 from mvpa.datasets.base import _Dataset as Dataset 8 911 samples = N.arange(12).reshape((4,3)) 12 labels = range(4) 13 chunks = [1, 1, 2, 2] 14 15 ds = Dataset.initSimple(samples, labels, chunks) 16 17 assert_array_equal(ds.samples, samples) 18 ok_(ds.sa.labels == labels) 19 ok_(ds.sa.chunks == chunks) 20 21 # XXX but why is this puking, or rather do we want to keep cluttering the 22 # interface like this -- I'd prefer having it all inside the collection. 23 ok_(ds.labels == labels) 24 ok_(ds.chunks == chunks) 25 26 ok_(sorted(ds.sa.names) == ['chunks', 'labels'])27
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Apr 23 23:09:51 2012 | http://epydoc.sourceforge.net |