Skip to content

Commit

Permalink
Add test for array functions in top-level cubed namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
tomwhite committed Jun 4, 2024
1 parent 6141f70 commit 83d97c8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cubed/tests/test_array_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,15 @@ def test_add_with_broadcast(spec, executor):
)


def test_add_top_level_namespace(spec, executor):
a = cubed.ones((10, 10), chunks=(10, 2), spec=spec)
b = cubed.ones((10, 10), chunks=(2, 10), spec=spec)
c = cubed.add(a, b)
assert_array_equal(
c.compute(executor=executor), np.ones((10, 10)) + np.ones((10, 10))
)


def test_equal(spec):
a = xp.asarray([[1, 2, 3], [4, 5, 6], [7, 8, 9]], chunks=(2, 2), spec=spec)
b = xp.asarray([[1, 2, 3], [4, 5, 6], [7, 8, 9]], chunks=(2, 2), spec=spec)
Expand Down

0 comments on commit 83d97c8

Please sign in to comment.