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
  • Element-wise 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 — trunc — Python array API standard DRAFT documentation

trunc¶

trunc(x: array, /) → array¶

Rounds each element x_i of the input array x to the nearest integer-valued number that is closer to zero than x_i.

Parameters:

x (array) – input array. Should have a real-valued data type.

Returns:

out (array) – an array containing the rounded result for each element in x. The returned array must have the same data type as x.

Notes

Special cases

  • If x_i is already integer-valued, the result is x_i.

For floating-point operands,

  • If x_i is +infinity, the result is +infinity.

  • If x_i is -infinity, the result is -infinity.

  • If x_i is +0, the result is +0.

  • If x_i is -0, the result is -0.

  • If x_i is NaN, the result is NaN.

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.