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 — shape — Python array API standard DRAFT documentation

shape¶

property array.shape: Tuple[int | None, ...]¶

Array dimensions.

Returns:

out (Tuple[Optional[int], …]) – array dimensions. An array dimension must be None if and only if a dimension is unknown.

Note

For array libraries having graph-based computational models, array dimensions may be unknown due to data-dependent operations (e.g., boolean indexing; A[:, B > 0]) and thus cannot be statically resolved without knowing array contents.

Note

The returned value should be a tuple; however, where warranted, an array library may choose to return a custom shape object. If an array library returns a custom shape object, the object must be immutable, must support indexing for dimension retrieval, and must behave similarly to a tuple.

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.