#NEWLINE# def test_from_buffer_struct( self ) : #NEWLINE# #INDENT# n = 10 #NEWLINE# x = ( np . arange ( n ) + ( np . arange ( ( n * 2 ) , ( n * 3 ) ) * 1j ) ) #NEWLINE# y = np . zeros ( n ) #NEWLINE# real_cfunc = jit ( nopython = True ) ( mod . vector_extract_real ) #NEWLINE# real_cfunc ( x , y ) #NEWLINE# np . testing . assert_equal ( x . real , y ) #NEWLINE# imag_cfunc = jit ( nopython = True ) ( mod . vector_extract_imag ) #NEWLINE# imag_cfunc ( x , y ) #NEWLINE# np . testing . assert_equal ( x . imag , y )