Skip to content

doc: Reduction operators: .any() vs .bool() #1219

Closed
@meithecatte

Description

@meithecatte

This section lists, among others, the following two reduction operators:

  • a.any() – reduction OR; is any bit set?
  • a.bool() – conversion to boolean; is non-zero?

If I am understanding these descriptions correctly, a.any() == a.bool() for all a. However, the existence of both has me confused – am I missing something?

If these two operators are just aliases, this fact should be called out in the docs. Otherwise, the difference between them should be explained.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions