Skip to content
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: add ak.array_equal to NEP18 overrides, documentation, and add one more test #3225

Merged
merged 3 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion docs/reference/toctree.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,12 @@
generated/ak.backend

.. toctree::
:caption: Approximation
:caption: Approximation and comparison

generated/ak.round
generated/ak.isclose
generated/ak.almost_equal
generated/ak.array_equal

.. toctree::
:caption: NumPy compatibility
Expand Down
1 change: 1 addition & 0 deletions src/awkward/operations/ak_array_equal.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
__all__ = ("array_equal",)


@ak._connect.numpy.implements("array_equal")
@high_level_function()
def array_equal(
a1,
Expand Down
7 changes: 7 additions & 0 deletions tests/test_1105_ak_aray_equal.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,10 @@ def test_array_equal_with_params():
)
assert not ak.array_equal(a1, a2)
assert ak.array_equal(a1, a2, check_parameters=False)


def test_array_equal_numpy_override():
assert np.array_equal(
ak.Array([[1, 2], [], [3, 4, 5]]),
ak.Array([[1, 2], [], [3, 4, 5]]),
)
Loading