#NEWLINE# def test_float32_shared_constructor( ) : #NEWLINE# #INDENT# npy_row = numpy . zeros ( ( 1 , 10 ) , dtype = 'float32' ) #NEWLINE# def eq( a , b ) : #NEWLINE# #INDENT# return ( a == b ) #NEWLINE# #UNINDENT# assert ( f32sc ( npy_row ) . type == CudaNdarrayType ( ( False , False ) ) ) #NEWLINE# assert eq ( f32sc ( npy_row , broadcastable = ( True , False ) ) . type , CudaNdarrayType ( ( True , False ) ) ) #NEWLINE# assert eq ( f32sc ( npy_row , broadcastable = [ True , False ] ) . type , CudaNdarrayType ( ( True , False ) ) ) #NEWLINE# assert eq ( f32sc ( npy_row , broadcastable = numpy . array ( [ True , False ] ) ) . type , CudaNdarrayType ( [ True , False ] ) ) #NEWLINE# assert eq ( f32sc ( numpy . zeros ( ( 2 , 3 , 4 , 5 ) , dtype = 'float32' ) ) . type , CudaNdarrayType ( ( ( False , ) * 4 ) ) )