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
  • Array object
  • Purpose and scope
  • Terms and Definitions
  • Use cases
  • Assumptions
  • Design topics & constraints
  • Future API standard evolution
  • Broadcasting
  • Constants
  • Creation Functions
  • Data Type Functions

This view

  • Original page
  • New address

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

__pow__¶

array.__pow__(other: int | float | complex | array, /) → array¶

Calculates an implementation-dependent approximation of exponentiation by raising each element (the base) of an array instance to the power of other_i (the exponent), where other_i is the corresponding element of the array other.

Parameters:
  • self (array) – array instance whose elements correspond to the exponentiation base. Should have a numeric data type.

  • other (Union[int, float, complex, array]) – other array whose elements correspond to the exponentiation exponent. Must be compatible with self (see Broadcasting). Should have a numeric data type.

Returns:

out (array) – an array containing the element-wise results. The returned array must have a data type determined by Type Promotion Rules.

Notes

  • Element-wise results, including special cases, must equal the results returned by the equivalent element-wise function pow().

  • If both self and other have integer data types, the result of __pow__ when other_i is negative (i.e., less than zero) is unspecified and thus implementation-dependent.

  • If self has an integer data type and other has a floating-point data type, behavior is implementation-dependent, as type promotion between data type “kinds” (e.g., integer versus floating-point) is unspecified.

Changed in version 2022.12: Added complex data type support.

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.