#NEWLINE# def test_basic_vector( self ) : #NEWLINE# #INDENT# '\n        Basic test for a vector.\n        Done by using the op and checking that it returns the right answer.\n        ' #NEWLINE# x = theano . tensor . vector ( ) #NEWLINE# inp = np . asarray ( [ 2 , 1 , 3 , 2 ] , dtype = config . floatX ) #NEWLINE# list_outs_expected = [ [ np . unique ( inp ) ] , np . unique ( inp , True ) , np . unique ( inp , False , True ) , np . unique ( inp , True , True ) ] #NEWLINE# if bool ( ( numpy_ver >= [ 1 , 9 ] ) ) : #NEWLINE# #INDENT# list_outs_expected . extend ( [ np . unique ( inp , False , False , True ) , np . unique ( inp , True , False , True ) , np . unique ( inp , False , True , True ) , np . unique ( inp , True , True , True ) ] ) #NEWLINE# #UNINDENT# for ( op , outs_expected ) in zip ( self . ops , list_outs_expected ) : #NEWLINE# #INDENT# f = theano . function ( inputs = [ x ] , outputs = op ( outs_expected , return_list = True ) ) #NEWLINE# outs = f ( inp ) #NEWLINE# for ( out , out_exp ) in zip ( outs , outs_expected ) : #NEWLINE# #INDENT# utt . assert_allclose ( out , out_exp )