diff _test_dataset.py @ 28:541a273bc89f

Removed __array__ method from dataset, whose semantics did not have a clear use (because of the possibility of overlapping fields).
author bengioy@grenat.iro.umontreal.ca
date Fri, 11 Apr 2008 13:08:51 -0400
parents 672fe4b23032
children 46c5c90019c2
line wrap: on
line diff
--- a/_test_dataset.py	Fri Apr 11 11:16:09 2008 -0400
+++ b/_test_dataset.py	Fri Apr 11 13:08:51 2008 -0400
@@ -48,16 +48,6 @@
         a_y = a.y
         self.failUnless(numpy.all( a_y == arr[:,1:4]))
 
-    def test_asarray(self):
-        arr = numpy.random.rand(3,4)
-        a=ArrayDataSet(data=arr,fields={"x":slice(2),"y":slice(2,4)})
-        a_arr = numpy.asarray(a)
-        self.failUnless(a_arr.shape[1] == 2 + 2)
-        self.failUnless(numpy.sum(numpy.square(a_arr-a.data))==0)
-        a=ArrayDataSet(data=arr,fields={"x":slice(2),"y":slice(1,4)})
-        a_arr = numpy.asarray(a)
-        self.failUnless(a_arr.shape[1] == 2 + 3)
-
     def test_minibatch_wraparound_even(self):
         arr = numpy.random.rand(10,4)
         arr2 = ArrayDataSet.Iterator.matcat(arr,arr)