Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Creation Functions

Array API specification for creating arrays.

A conforming implementation of the array API standard must provide and support the following functions.

Objects in API

arange(start, /, stop=None, step=1, *, dtype=None, device=None)

Returns evenly spaced values within the half-open interval[start,stop) as a one-dimensional array.

asarray(obj, /, *, dtype=None, device=None, copy=None)

Convert the input to an array.

empty(shape, *, dtype=None, device=None)

Returns an uninitialized array having a specifiedshape.

empty_like(x, /, *, dtype=None, device=None)

Returns an uninitialized array with the sameshape as an input arrayx.

eye(n_rows, n_cols=None, /, *, k=0, dtype=None, device=None)

Returns a two-dimensional array with ones on thekth diagonal and zeros elsewhere.

from_dlpack(x, /, *, device=None, copy=None)

Returns a new array containing the data from another (array) object with a__dlpack__ method.

full(shape, fill_value, *, dtype=None, device=None)

Returns a new array having a specifiedshape and filled withfill_value.

full_like(x, /, fill_value, *, dtype=None, device=None)

Returns a new array filled withfill_value and having the sameshape as an input arrayx.

linspace(start, stop, /, num, *, dtype=None, device=None, endpoint=True)

Returns evenly spaced numbers over a specified interval.

meshgrid(*arrays, indexing='xy')

Returns coordinate matrices from coordinate vectors.

ones(shape, *, dtype=None, device=None)

Returns a new array having a specifiedshape and filled with ones.

ones_like(x, /, *, dtype=None, device=None)

Returns a new array filled with ones and having the sameshape as an input arrayx.

tril(x, /, *, k=0)

Returns the lower triangular part of a matrix (or a stack of matrices)x.

triu(x, /, *, k=0)

Returns the upper triangular part of a matrix (or a stack of matrices)x.

zeros(shape, *, dtype=None, device=None)

Returns a new array having a specifiedshape and filled with zeros.

zeros_like(x, /, *, dtype=None, device=None)

Returns a new array filled with zeros and having the sameshape as an input arrayx.


[8]ページ先頭

©2009-2025 Movatter.jp