Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix import. Fix tests. Fix backend imports
  • Loading branch information
roaffix authored and sakchal committed Apr 25, 2024
commit a28d707cabfc9b8b7f04f085f0425a35ed952e41
19 changes: 0 additions & 19 deletions tests/test_library/test_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,49 +89,30 @@ def test_randu_invalid_shape_type() -> None:
# Test with an invalid shape (non-tuple)
with pytest.raises(ValueError):
shape = [5, 5]
<<<<<<< HEAD
af.randu(shape) # type: ignore[arg-type]
=======
random.randu(shape) # type: ignore[arg-type]
>>>>>>> 951aee8 (Update tests. Add randn)


# Test cases for the randn function


def test_randn_shape_1d() -> None:
shape = (10,)
<<<<<<< HEAD
result: af.Array = af.randn(shape)
assert isinstance(result, af.Array)
=======
result: Array = random.randn(shape)
assert isinstance(result, Array)
>>>>>>> 951aee8 (Update tests. Add randn)
assert result.shape == shape


def test_randn_shape_2d() -> None:
shape = (5, 7)
<<<<<<< HEAD
result: af.Array = af.randn(shape)
assert isinstance(result, af.Array)
=======
result: Array = random.randn(shape)
assert isinstance(result, Array)
>>>>>>> 951aee8 (Update tests. Add randn)
assert result.shape == shape


def test_randn_shape_3d() -> None:
shape = (3, 4, 6)
<<<<<<< HEAD
result: af.Array = af.randn(shape)
assert isinstance(result, af.Array)
=======
result: Array = random.randn(shape)
assert isinstance(result, Array)
>>>>>>> 951aee8 (Update tests. Add randn)
assert result.shape == shape


Expand Down