def test_cubic(self): np.random.seed(12460) assert_array_equal(bsp.cubic([0]), array([0])) data_array_complex = np.random.rand(4, 4) + np.random.rand(4, 4) * 1j data_array_complex = 1 + 1j - 2 * data_array_complex # scaling the magnitude by 10 makes the results close enough to zero, # that the assertion fails, so just make the elements have a mix of # positive and negative imaginary components... result_array_complex = array( [[0.23056563, 0.38414406, 0.08342987, 0.06904847], [0.17240848, 0.47055447, 0.63896278, 0.39756424], [0.12672571, 0.65862632, 0.1116695, 0.09700386], [0.3544116, 0.17856518, 0.1528841, 0.17285762]]) assert_allclose(bsp.cubic(data_array_complex), result_array_complex)
def test_cubic(self): np.random.seed(12460) assert_array_equal(bsp.cubic([0]), array([0])) data_array_complex = np.random.rand(4, 4) + np.random.rand(4, 4)*1j data_array_complex = 1+1j-2*data_array_complex # scaling the magnitude by 10 makes the results close enough to zero, # that the assertion fails, so just make the elements have a mix of # positive and negative imaginary components... result_array_complex = array( [[0.23056563, 0.38414406, 0.08342987, 0.06904847], [0.17240848, 0.47055447, 0.63896278, 0.39756424], [0.12672571, 0.65862632, 0.1116695, 0.09700386], [0.3544116, 0.17856518, 0.1528841, 0.17285762]]) assert_allclose(bsp.cubic(data_array_complex), result_array_complex)