dpctl.tensor
Data Parallel Tensor Collection is a collection of tensor implementations that implement Python data API (https://data-apis.github.io/array-api/latest/) standard.
Classes
An object representing Data-API concept of device. |
|
|
Create a data type object. |
An array object represents a multidimensional tensor of numeric elements stored in a USM allocation on a SYCL device. |
Array Construction
Returns evenly spaced values within the half-open interval [start, stop) as a one-dimensional array. |
|
Converts obj to |
|
Copies content of |
|
Returns a copy of the |
|
Creates a copy of given instance of |
|
Creates |
|
Returns an uninitialized |
|
Creates |
|
Creates |
|
Returns a new |
|
Returns a new |
|
Returns |
|
Creates list of |
|
Returns a new |
|
Returns a new |
|
Copies content of |
|
Returns the lower triangular part of a matrix (or a stack of matrices) x. |
|
Returns the upper triangular part of a matrix (or a stack of matrices) x. |
|
Returns a new |
|
Creates |
Array Manipulation
Broadcasts one or more |
|
Broadcast an array to a new shape; returns the broadcasted |
|
Joins a sequence of arrays along an existing axis. |
|
Expands the shape of an array by inserting a new axis (dimension) of size one at the position specified by axis. |
|
Reverses the order of elements in an array x along the given axis. |
|
Moves axes of an array to new positions. |
|
Permute the axes (dimensions) of an array; returns the permuted array as a view. |
|
Repeat elements of an array. |
|
Reshapes array x into new shape. |
|
Rolls array elements along a specified axis. |
|
Removes singleton dimensions (axes) from array x. |
|
Joins a sequence of arrays along a new axis. |
|
Interchanges two axes of an array. |
|
Repeat an input array x along each axis a number of times given by repetitions. |
|
Splits an array in a sequence of arrays along the given axis. |
Other Functions
Returns a namespace with Array API namespace inspection utilities. |
|
Tests whether all input array elements evaluate to True along a given axis. |
|
Returns True if two arrays are element-wise equal within tolerances. |
|
Tests whether any input array elements evaluate to True along a given axis. |
|
Returns the indices of the maximum values of the input array x along a specified axis. |
|
Returns the indices of the minimum values of the input array x along a specified axis. |
|
Returns the indices that sort an array x along a specified axis. |
|
Determines if one data type can be cast to another data type according to Type Promotion Rules. |
|
Clips to the range [min_i, max_i] for each element x_i in x. |
|
Returns the elements of an array that satisfies the condition. |
|
Returns machine limits for floating-point data types. |
|
Returns a copy of current options for printing |
|
Returns machine limits for integer data types. |
|
Returns a boolean indicating whether a provided dtype is of a specified data type kind. |
|
Calculates the logarithm of the sum of exponentials of elements in the input array x. |
|
Computes the matrix product. Implements the same semantics as the built-in operator @. |
|
Transposes the innermost two dimensions of x, where x is a 2-dimensional matrix or a stack of 2-dimensional matrices. |
|
Calculates the maximum value of the input array x. |
|
Calculates the arithmetic mean of elements in the input array x. |
|
Calculates the minimum value of the input array x. |
|
Return the indices of non-zero elements. |
|
Change elements of an array based on conditional and input values. |
|
Context manager for print options. |
|
Calculates the product of elements in the input array x. |
|
Puts values of an array into another array along a given axis. |
|
Calculates the square root of the sum of squares of elements in the input array x. |
|
Returns the dtype that results from applying the Type Promotion Rules to the arguments. |
|
Set options for printing |
|
Returns a sorted copy of an input array x. |
|
Calculates the standard deviation of elements in the input array x. |
|
Calculates the sum of elements in the input array x. |
|
Takes elements from array along a given axis. |
|
Returns a tensor contraction of x1 and x2 over specific axes. |
|
Returns the unique elements of an input array x, the first occurring indices for each unique element in x, the indices from the set of unique elements that reconstruct x, and the corresponding counts for each unique element in x. |
|
Returns the unique elements of an input array x and the corresponding counts for each unique element in x. |
|
unique_inverse Returns the unique elements of an input array x and the indices from the set of unique elements that reconstruct x. |
|
Returns the unique elements of an input array x. |
|
Returns a formatted string representing the elements of a |
|
Returns a string representing the elements of a |
|
Calculates the variance of elements in the input array x. |
|
Computes the (vector) dot product of two arrays. |
|
Returns |