GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • 
  • Consortium for Python Data API Standards
  • API specification
  • Set Functions
  • Purpose and scope
  • Terms and Definitions
  • Use cases
  • Assumptions
  • Design topics & constraints
  • Future API standard evolution
  • Array object
  • Broadcasting
  • Constants
  • Creation Functions

This view

  • Original page
  • New address

GeezerVison is showing data-apis.org — isin — Python array API standard DRAFT documentation

isin¶

isin(x1: array | int, x2: array | int, /, *, invert: bool = False) → array¶

Tests for each element in x1 whether the element is in x2.

Parameters:
  • x1 (Union[array, int]) – first input array. Should have an integer data type.

  • x2 (Union[array, int]) – second input array. Should have an integer data type.

  • invert (bool) – boolean indicating whether to invert the test criterion. If True, the function must test whether each element in x1 is not in x2. If False, the function must test whether each element in x1 is in x2. Default: False.

Returns:

out (array) – an array containing element-wise test results. The returned array must have a boolean data type. If x1 is an array, the returned array must have the same shape as x1; otherwise, the returned array must be a zero-dimensional array containing the result.

Notes

  • At least one of x1 or x2 must be an array.

  • If an element in x1 is in x2, the corresponding element in the output array must be True; otherwise, the corresponding element in the output array must be False.

  • Testing whether an element in x1 corresponds to an element in x2 must be determined based on value equality (see equal()).

  • Comparison of arrays without a corresponding promotable data type (see Type Promotion Rules) is unspecified and thus implementation-defined.

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.