File: test_2934_argmin_argmax_bool.py

package info (click to toggle)
python-awkward 2.6.5-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 23,088 kB
  • sloc: python: 148,689; cpp: 33,562; sh: 432; makefile: 21; javascript: 8
file content (12 lines) | stat: -rw-r--r-- 361 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
# BSD 3-Clause License; see https://github.com/scikit-hep/awkward/blob/main/LICENSE

from __future__ import annotations

import awkward as ak


def test():
    array = ak.Array([[True, False, True], [False, False, True, False], [True, False]])

    assert ak.argmin(array, axis=1).tolist() == [1, 0, 1]
    assert ak.argmax(array, axis=1).tolist() == [0, 2, 0]