def test_quadratic(self): np.random.seed(12461) assert_array_equal(bsp.quadratic([0]), array([0])) data_array_complex = np.random.rand(4, 4) + np.random.rand(4, 4) * 1j # scaling the magnitude by 10 makes the results all zero, # so just make the elements have a mix of positive and negative # imaginary components... data_array_complex = (1 + 1j - 2 * data_array_complex) result_array_complex = array( [[0.23062746, 0.06338176, 0.34902312, 0.31944105], [0.14701256, 0.13277773, 0.29428615, 0.09814697], [0.52873842, 0.06484157, 0.09517566, 0.46420389], [0.09286829, 0.09371954, 0.1422526, 0.16007024]]) assert_allclose(bsp.quadratic(data_array_complex), result_array_complex)
def test_quadratic(self): np.random.seed(12461) assert_array_equal(bsp.quadratic([0]), array([0])) data_array_complex = np.random.rand(4, 4) + np.random.rand(4, 4)*1j # scaling the magnitude by 10 makes the results all zero, # so just make the elements have a mix of positive and negative # imaginary components... data_array_complex = (1+1j-2*data_array_complex) result_array_complex = array( [[0.23062746, 0.06338176, 0.34902312, 0.31944105], [0.14701256, 0.13277773, 0.29428615, 0.09814697], [0.52873842, 0.06484157, 0.09517566, 0.46420389], [0.09286829, 0.09371954, 0.1422526, 0.16007024]]) assert_allclose(bsp.quadratic(data_array_complex), result_array_complex)