Skip to content

ENH: Function to find the largest element and its index #19

@seberg

Description

@seberg

Sometimes it is convenient to find the largest element and it's index at the same time. Of course finding the largest element can already be achieved with max().

The largest_element() function should return a tuple of value, index.

Working on this issue

This function already exists as a stub with some documentation. We have already provided a basic test as well.

  • Find and expand the largest_element stub with an implementation.
  • Find the test_largest_element test, and remove the @pytest.mark.xfail. Hopefully, the test passes now!
  • Commit your changes and create a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions