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

This view

  • Original page
  • New address

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

full¶

full(shape: int | Tuple[int, ...], fill_value: bool | int | float | complex, *, dtype: dtype | None = None, device: device | None = None) → array¶

Returns a new array having a specified shape and filled with fill_value.

Parameters:
  • shape (Union[int, Tuple[int, ...]]) – output array shape.

  • fill_value (Union[bool, int, float, complex]) – fill value.

  • dtype (Optional[dtype]) –

    output array data type. If dtype is None, the output array data type must be inferred from fill_value according to the following rules:

    • If the fill value is an int, the output array data type must be the default integer data type.

    • If the fill value is a float, the output array data type must be the default real-valued floating-point data type.

    • If the fill value is a complex number, the output array data type must be the default complex floating-point data type.

    • If the fill value is a bool, the output array must have a boolean data type. Default: None.

    Note

    If the fill_value exceeds the precision of the resolved default output array data type, behavior is left unspecified and, thus, implementation-defined.

  • device (Optional[device]) – device on which to place the created array. Default: None.

Returns:

out (array) – an array where every element is equal to fill_value.

Notes

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.