New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing windows tests and add tests for numpy ops without numba #1343

Merged
merged 7 commits into from Dec 4, 2015

Conversation

Projects
None yet
2 participants
@cpcloud
Member

cpcloud commented Dec 4, 2015

No description provided.

@cpcloud cpcloud added this to the 0.9.0 milestone Dec 4, 2015

@cpcloud cpcloud self-assigned this Dec 4, 2015

@cowlicks

This comment has been minimized.

Contributor

cowlicks commented Dec 4, 2015

Is this to fix these errors on windows?

================================== FAILURES ===================================
___________________________ test_binary_math[atan2] ___________________________

funcname = 'atan2'

    @pytest.mark.parametrize('funcname',
                             ['atan2', 'copysign', 'hypot', 'ldexp',
                              pytest.mark.xfail('fmod', raises=numba.TypingError)])
    def test_binary_math(funcname):
        s_data = np.arange(15).reshape(5, 3)
        t_data = np.arange(15, 30).reshape(5, 3)
        s = symbol('s', discover(s_data))
        t = symbol('t', discover(t_data))
        scope = {s: s_data, t: t_data}
        result = compute(getattr(blaze, funcname)(s, t), scope)
        expected = getattr(np, binary_name_map.get(funcname, funcname))(s_data,
                                                                        t_data)
>       assert np.all(result == expected)
E       assert <function all at 0x020E6030>(array([[ 0.  ... 0.44975961]]) == array([[ 0.   ... 0.44975961]])
E        +  where <function all at 0x020E6030> = np.all
E         Use -v to get the full diff)

compute\tests\test_numpy_compute.py:633: AssertionError
___________________________ test_binary_math[hypot] ___________________________

funcname = 'hypot'

    @pytest.mark.parametrize('funcname',
                             ['atan2', 'copysign', 'hypot', 'ldexp',
                              pytest.mark.xfail('fmod', raises=numba.TypingError)])
    def test_binary_math(funcname):
        s_data = np.arange(15).reshape(5, 3)
        t_data = np.arange(15, 30).reshape(5, 3)
        s = symbol('s', discover(s_data))
        t = symbol('t', discover(t_data))
        scope = {s: s_data, t: t_data}
        result = compute(getattr(blaze, funcname)(s, t), scope)
        expected = getattr(np, binary_name_map.get(funcname, funcname))(s_data,
                                                                        t_data)
>       assert np.all(result == expected)
E       assert <function all at 0x020E6030>(array([[ 15. ...32.20248438]]) == array([[ 15.  ...32.20248438]])
E        +  where <function all at 0x020E6030> = np.all
E         Use -v to get the full diff)

compute\tests\test_numpy_compute.py:633: AssertionError
=== 2 failed, 493 passed, 7 skipped, 20 xfailed, 1 xpassed in 15.45 seconds ===

I was able to fix these using np.testing.assert_array_almost_equal. See #1344. Should this supersede my PR?

cpcloud added a commit that referenced this pull request Dec 4, 2015

Merge pull request #1343 from cpcloud/windows-math-fixes
Fix failing windows tests and add tests for numpy ops without numba

@cpcloud cpcloud merged commit e55ac9f into blaze:master Dec 4, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@cpcloud cpcloud deleted the cpcloud:windows-math-fixes branch Dec 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment