#NEWLINE# def test_local_csm_properties_csm( ) : #NEWLINE# #INDENT# data = tensor . vector ( ) #NEWLINE# ( indices , indptr , shape ) = ( tensor . ivector ( ) , tensor . ivector ( ) , tensor . ivector ( ) ) #NEWLINE# mode = theano . compile . mode . get_default_mode ( ) #NEWLINE# mode = mode . including ( 'specialize' , 'local_csm_properties_csm' ) #NEWLINE# for ( CS , cast ) in [ ( sparse . CSC , sp . csc_matrix ) , ( sparse . CSR , sp . csr_matrix ) ] : #NEWLINE# #INDENT# f = theano . function ( [ data , indices , indptr , shape ] , sparse . csm_properties ( CS ( data , indices , indptr , shape ) ) , mode = mode ) #NEWLINE# assert ( not any ( ( isinstance ( node . op , ( sparse . CSM , sparse . CSMProperties ) ) for node in f . maker . fgraph . toposort ( ) ) ) ) #NEWLINE# v = cast ( random_lil ( ( 10 , 40 ) , config . floatX , 3 ) ) #NEWLINE# f ( data . data , v . indices , v . indptr , v . shape )