Skip to content
Snippets Groups Projects
test_arraycontext.py 30 KiB
Newer Older
  • Learn to ignore specific revisions
  •             # See https://github.com/inducer/pyopencl/issues/498
                return cl.version.VERSION > (2021, 2, 5)
    
        if _actx_allows_scalar_broadcast(actx):
            quux = foo + actx.from_numpy(np.array(4))
            quuz = actx.from_numpy(np.array(4)) + foo
    
            np.testing.assert_allclose(actx.to_numpy(bar.u[0]),
                                       actx.to_numpy(quux.u[0]))
    
            np.testing.assert_allclose(actx.to_numpy(bar.u[0]),
                                       actx.to_numpy(quuz.u[0]))
    
    
    if __name__ == "__main__":
        import sys
        if len(sys.argv) > 1:
            exec(sys.argv[1])
        else:
            from pytest import main
            main([__file__])
    
    # vim: fdm=marker