diff --git a/CHANGELOG.md b/CHANGELOG.md index d4c45aa8d280..dd0d169e1984 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ Also, that release drops support for Python 3.9, making Python 3.10 the minimum * Silenced `pybind11` CMake message due to using compatibility mode for Python [#2614](https://github.com/IntelPython/dpnp/pull/2614) * Changed the license from `BSD-2-Clause` to `BSD-3-Clause` [#2593](https://github.com/IntelPython/dpnp/pull/2593) * Defined explicit versions range of the Python interpreter which is needed during the build [#2634](https://github.com/IntelPython/dpnp/pull/2634) +* Aligned documentation with NumPy and CuPy style by using short function names [#2633](https://github.com/IntelPython/dpnp/pull/2633) ### Deprecated diff --git a/doc/reference/array-creation.rst b/doc/reference/array-creation.rst index 279743c5dae3..73cd9a81fd4f 100644 --- a/doc/reference/array-creation.rst +++ b/doc/reference/array-creation.rst @@ -1,9 +1,11 @@ .. _routines.array-creation: +.. currentmodule:: dpnp + Array creation routines ======================= -.. https://numpy.org/doc/stable/reference/routines.array-creation.html +.. hint:: `NumPy API Reference: Array creation routines `_ From shape or value ----------------------- @@ -12,16 +14,16 @@ From shape or value :toctree: generated/ :nosignatures: - dpnp.empty - dpnp.empty_like - dpnp.eye - dpnp.identity - dpnp.ones - dpnp.ones_like - dpnp.zeros - dpnp.zeros_like - dpnp.full - dpnp.full_like + empty + empty_like + eye + identity + ones + ones_like + zeros + zeros_like + full + full_like From existing data @@ -31,19 +33,19 @@ From existing data :toctree: generated/ :nosignatures: - dpnp.array - dpnp.asarray - dpnp.asanyarray - dpnp.ascontiguousarray - dpnp.astype - dpnp.copy - dpnp.frombuffer - dpnp.from_dlpack - dpnp.fromfile - dpnp.fromfunction - dpnp.fromiter - dpnp.fromstring - dpnp.loadtxt + array + asarray + asanyarray + ascontiguousarray + astype + copy + frombuffer + from_dlpack + fromfile + fromfunction + fromiter + fromstring + loadtxt Numerical ranges @@ -53,13 +55,13 @@ Numerical ranges :toctree: generated/ :nosignatures: - dpnp.arange - dpnp.linspace - dpnp.logspace - dpnp.geomspace - dpnp.meshgrid - dpnp.mgrid - dpnp.ogrid + arange + linspace + logspace + geomspace + meshgrid + mgrid + ogrid Building matrices @@ -69,18 +71,9 @@ Building matrices :toctree: generated/ :nosignatures: - dpnp.diag - dpnp.diagflat - dpnp.tri - dpnp.tril - dpnp.triu - dpnp.vander - - -The Matrix class ----------------- -.. autosummary:: - :toctree: generated/ - :nosignatures: - - dpnp.bmat + diag + diagflat + tri + tril + triu + vander diff --git a/doc/reference/array-manipulation.rst b/doc/reference/array-manipulation.rst index 3a1593a89a31..4e39fd811aae 100644 --- a/doc/reference/array-manipulation.rst +++ b/doc/reference/array-manipulation.rst @@ -1,7 +1,9 @@ +.. currentmodule:: dpnp + Array manipulation routines =========================== -.. https://numpy.org/doc/stable/reference/routines.array-manipulation.html +.. hint:: `NumPy API Reference: Array manipulation routines `_ Basic operations ---------------- @@ -10,10 +12,10 @@ Basic operations :toctree: generated/ :nosignatures: - dpnp.copyto - dpnp.ndim - dpnp.shape - dpnp.size + copyto + ndim + shape + size Changing array shape @@ -23,10 +25,10 @@ Changing array shape :toctree: generated/ :nosignatures: - dpnp.reshape - dpnp.ravel - dpnp.ndarray.flat - dpnp.ndarray.flatten + reshape + ravel + ndarray.flat + ndarray.flatten Transpose-like operations @@ -36,13 +38,13 @@ Transpose-like operations :toctree: generated/ :nosignatures: - dpnp.moveaxis - dpnp.rollaxis - dpnp.swapaxes - dpnp.ndarray.T - dpnp.transpose - dpnp.permute_dims - dpnp.matrix_transpose (Array API compatible) + moveaxis + rollaxis + swapaxes + ndarray.T + transpose + permute_dims + matrix_transpose (Array API compatible) Changing number of dimensions @@ -52,14 +54,14 @@ Changing number of dimensions :toctree: generated/ :nosignatures: - dpnp.atleast_1d - dpnp.atleast_2d - dpnp.atleast_3d - dpnp.broadcast - dpnp.broadcast_to - dpnp.broadcast_arrays - dpnp.expand_dims - dpnp.squeeze + atleast_1d + atleast_2d + atleast_3d + broadcast + broadcast_to + broadcast_arrays + expand_dims + squeeze Changing kind of array @@ -69,14 +71,14 @@ Changing kind of array :toctree: generated/ :nosignatures: - dpnp.asarray - dpnp.asanyarray - dpnp.asnumpy - dpnp.asfarray - dpnp.asfortranarray - dpnp.ascontiguousarray - dpnp.asarray_chkfinite - dpnp.require + asarray + asanyarray + asnumpy + asfarray + asfortranarray + ascontiguousarray + asarray_chkfinite + require Joining arrays @@ -86,15 +88,15 @@ Joining arrays :toctree: generated/ :nosignatures: - dpnp.concatenate - dpnp.concat - dpnp.stack - dpnp.block - dpnp.vstack - dpnp.hstack - dpnp.dstack - dpnp.column_stack - dpnp.row_stack + concatenate + concat + stack + block + vstack + hstack + dstack + column_stack + row_stack Splitting arrays @@ -104,12 +106,12 @@ Splitting arrays :toctree: generated/ :nosignatures: - dpnp.split - dpnp.array_split - dpnp.dsplit - dpnp.hsplit - dpnp.vsplit - dpnp.unstack + split + array_split + dsplit + hsplit + vsplit + unstack Tiling arrays @@ -119,8 +121,8 @@ Tiling arrays :toctree: generated/ :nosignatures: - dpnp.tile - dpnp.repeat + tile + repeat Adding and removing elements @@ -130,12 +132,12 @@ Adding and removing elements :toctree: generated/ :nosignatures: - dpnp.delete - dpnp.insert - dpnp.append - dpnp.resize - dpnp.trim_zeros - dpnp.pad + delete + insert + append + resize + trim_zeros + pad Rearranging elements @@ -145,8 +147,8 @@ Rearranging elements :toctree: generated/ :nosignatures: - dpnp.flip - dpnp.fliplr - dpnp.flipud - dpnp.roll - dpnp.rot90 + flip + fliplr + flipud + roll + rot90 diff --git a/doc/reference/array_api.rst b/doc/reference/array_api.rst index 298341076b22..4912a18ba0d2 100644 --- a/doc/reference/array_api.rst +++ b/doc/reference/array_api.rst @@ -1,11 +1,13 @@ .. _array-api-standard-compatibility: -.. https://numpy.org/doc/stable/reference/array_api.html +.. currentmodule:: dpnp ******************************** Array API standard compatibility ******************************** +.. hint:: `NumPy API Reference: Array API standard compatibility `_ + DPNP's main namespace as well as the :mod:`dpnp.fft` and :mod:`dpnp.linalg` namespaces are compatible with the `2024.12 version `__ @@ -23,4 +25,4 @@ function, which returns a namespace containing the inspection utilities. :toctree: generated/ :nosignatures: - dpnp.__array_namespace_info__ + __array_namespace_info__ diff --git a/doc/reference/bitwise.rst b/doc/reference/bitwise.rst index 97f01c895dbf..0151189e4158 100644 --- a/doc/reference/bitwise.rst +++ b/doc/reference/bitwise.rst @@ -1,7 +1,9 @@ +.. currentmodule:: dpnp + Bit-wise operations =================== -.. https://numpy.org/doc/stable/reference/routines.bitwise.html +.. hint:: `NumPy API Reference: Bit-wise operations `_ Element-wise bit operations --------------------------- @@ -10,17 +12,17 @@ Element-wise bit operations :toctree: generated/ :nosignatures: - dpnp.bitwise_and - dpnp.bitwise_not - dpnp.bitwise_or - dpnp.bitwise_xor - dpnp.invert - dpnp.bitwise_invert - dpnp.left_shift - dpnp.bitwise_left_shift - dpnp.right_shift - dpnp.bitwise_right_shift - dpnp.bitwise_count + bitwise_and + bitwise_not + bitwise_or + bitwise_xor + invert + bitwise_invert + left_shift + bitwise_left_shift + right_shift + bitwise_right_shift + bitwise_count Bit packing ----------- @@ -29,8 +31,8 @@ Bit packing :toctree: generated/ :nosignatures: - dpnp.packbits - dpnp.unpackbits + packbits + unpackbits Output formatting ----------------- @@ -39,4 +41,4 @@ Output formatting :toctree: generated/ :nosignatures: - dpnp.binary_repr + binary_repr diff --git a/doc/reference/constants.rst b/doc/reference/constants.rst index 256a2bdb12dd..0f86cfc1362c 100644 --- a/doc/reference/constants.rst +++ b/doc/reference/constants.rst @@ -1,6 +1,8 @@ Constants ========= +.. hint:: `NumPy API Reference: Constants `_ + DPNP includes several constants: .. currentmodule:: dpnp diff --git a/doc/reference/dtype.rst b/doc/reference/dtype.rst index 7b71fb1cc721..44e452d3475e 100644 --- a/doc/reference/dtype.rst +++ b/doc/reference/dtype.rst @@ -1,19 +1,21 @@ .. _dtype: +.. currentmodule:: dpnp + Data type routines ================== -.. https://numpy.org/doc/stable/reference/routines.dtype.html +.. hint:: `NumPy API Reference: Data type routines `_ .. autosummary:: :toctree: generated/ :nosignatures: - dpnp.can_cast - dpnp.promote_types - dpnp.min_scalar_type - dpnp.result_type - dpnp.common_type + can_cast + promote_types + min_scalar_type + result_type + common_type Creating data types ------------------- @@ -21,8 +23,8 @@ Creating data types :toctree: generated/ :nosignatures: - dpnp.dtype - dpnp.format_parser + dtype + format_parser Data type information --------------------- @@ -30,8 +32,8 @@ Data type information :toctree: generated/ :nosignatures: - dpnp.finfo - dpnp.iinfo + finfo + iinfo Data type testing ----------------- @@ -39,8 +41,8 @@ Data type testing :toctree: generated/ :nosignatures: - dpnp.isdtype - dpnp.issubdtype + isdtype + issubdtype Miscellaneous ------------- @@ -48,5 +50,5 @@ Miscellaneous :toctree: generated/ :nosignatures: - dpnp.typename - dpnp.mintypecode + typename + mintypecode diff --git a/doc/reference/exceptions.rst b/doc/reference/exceptions.rst index 2d9f530fbe96..8f459b9f3aaa 100644 --- a/doc/reference/exceptions.rst +++ b/doc/reference/exceptions.rst @@ -5,6 +5,8 @@ Exceptions and Warnings ======================= +.. hint:: `NumPy API Reference: Exceptions and Warnings `_ + General exceptions used by DPNP. Note that some exceptions may be module specific, such as linear algebra errors. diff --git a/doc/reference/fft.rst b/doc/reference/fft.rst index 14d10d053309..473e6c4b7b8a 100644 --- a/doc/reference/fft.rst +++ b/doc/reference/fft.rst @@ -1,11 +1,11 @@ .. _routines.fft: -.. py:module:: dpnp.fft +.. currentmodule:: dpnp.fft -Discrete Fourier Transform -========================== +Discrete Fourier Transform (:mod:`dpnp.fft`) +============================================ -.. https://numpy.org/doc/stable/reference/routines.fft.html +.. hint:: `NumPy API Reference: Discrete Fourier Transform (numpy.fft) `_ Standard FFTs ------------- @@ -14,12 +14,12 @@ Standard FFTs :toctree: generated/ :nosignatures: - dpnp.fft.fft - dpnp.fft.ifft - dpnp.fft.fft2 - dpnp.fft.ifft2 - dpnp.fft.fftn - dpnp.fft.ifftn + fft + ifft + fft2 + ifft2 + fftn + ifftn Real FFTs @@ -29,12 +29,12 @@ Real FFTs :toctree: generated/ :nosignatures: - dpnp.fft.rfft - dpnp.fft.irfft - dpnp.fft.rfft2 - dpnp.fft.irfft2 - dpnp.fft.rfftn - dpnp.fft.irfftn + rfft + irfft + rfft2 + irfft2 + rfftn + irfftn Hermitian FFTs @@ -44,8 +44,8 @@ Hermitian FFTs :toctree: generated/ :nosignatures: - dpnp.fft.hfft - dpnp.fft.ihfft + hfft + ihfft Helper routines @@ -55,16 +55,16 @@ Helper routines :toctree: generated/ :nosignatures: - dpnp.fft.fftfreq - dpnp.fft.rfftfreq - dpnp.fft.fftshift - dpnp.fft.ifftshift + fftfreq + rfftfreq + fftshift + ifftshift .. fft.config module is not implemented yet - .. dpnp.fft.config.set_cufft_callbacks - .. dpnp.fft.config.set_cufft_gpus - .. dpnp.fft.config.get_plan_cache - .. dpnp.fft.config.show_plan_cache_info + .. config.set_cufft_callbacks + .. config.set_cufft_gpus + .. config.get_plan_cache + .. config.show_plan_cache_info .. automodule:: dpnp.fft :no-index: diff --git a/doc/reference/functional.rst b/doc/reference/functional.rst index d992a30dda25..0569e2c3c608 100644 --- a/doc/reference/functional.rst +++ b/doc/reference/functional.rst @@ -1,14 +1,16 @@ +.. currentmodule:: dpnp + Functional programming ====================== -.. https://numpy.org/doc/stable/reference/routines.functional.html +.. hint:: `NumPy API Reference: Functional programming `_ .. autosummary:: :toctree: generated/ :nosignatures: - dpnp.apply_along_axis - dpnp.apply_over_axes - dpnp.vectorize - dpnp.frompyfunc - dpnp.piecewise + apply_along_axis + apply_over_axes + vectorize + frompyfunc + piecewise diff --git a/doc/reference/indexing.rst b/doc/reference/indexing.rst index 491964c7f492..bbb5395c39dc 100644 --- a/doc/reference/indexing.rst +++ b/doc/reference/indexing.rst @@ -1,10 +1,12 @@ .. _routines.indexing: .. _arrays.indexing: +.. currentmodule:: dpnp + Indexing routines ================= -.. https://numpy.org/doc/stable/reference/routines.indexing.html +.. hint:: `NumPy API Reference: Indexing routines `_ Generating index arrays ----------------------- @@ -12,23 +14,23 @@ Generating index arrays :toctree: generated/ :nosignatures: - dpnp.c_ - dpnp.r_ - dpnp.s_ - dpnp.nonzero - dpnp.where - dpnp.indices - dpnp.ix_ - dpnp.ogrid - dpnp.ravel_multi_index - dpnp.unravel_index - dpnp.diag_indices - dpnp.diag_indices_from - dpnp.mask_indices - dpnp.tril_indices - dpnp.tril_indices_from - dpnp.triu_indices - dpnp.triu_indices_from + c_ + r_ + s_ + nonzero + where + indices + ix_ + ogrid + ravel_multi_index + unravel_index + diag_indices + diag_indices_from + mask_indices + tril_indices + tril_indices_from + triu_indices + triu_indices_from Indexing-like operations @@ -37,13 +39,13 @@ Indexing-like operations :toctree: generated/ :nosignatures: - dpnp.take - dpnp.take_along_axis - dpnp.choose - dpnp.compress - dpnp.diag - dpnp.diagonal - dpnp.select + take + take_along_axis + choose + compress + diag + diagonal + select Inserting data into arrays @@ -52,11 +54,11 @@ Inserting data into arrays :toctree: generated/ :nosignatures: - dpnp.place - dpnp.put - dpnp.put_along_axis - dpnp.putmask - dpnp.fill_diagonal + place + put + put_along_axis + putmask + fill_diagonal Iterating over arrays @@ -65,9 +67,9 @@ Iterating over arrays :toctree: generated/ :nosignatures: - dpnp.nditer - dpnp.ndenumerate - dpnp.ndindex - dpnp.nested_iters - dpnp.flatiter - dpnp.iterable + nditer + ndenumerate + ndindex + nested_iters + flatiter + iterable diff --git a/doc/reference/linalg.rst b/doc/reference/linalg.rst index e397ba20c42c..1072b5a019fe 100644 --- a/doc/reference/linalg.rst +++ b/doc/reference/linalg.rst @@ -1,11 +1,11 @@ .. _routines.linalg: -.. py:module:: dpnp.linalg +.. currentmodule:: dpnp -Linear algebra -============== +Linear algebra (:mod:`dpnp.linalg`) +=================================== -.. https://numpy.org/doc/stable/reference/routines.linalg.html +.. hint:: `NumPy API Reference: Linear algebra (numpy.linalg) `_ Matrix and vector products -------------------------- @@ -14,24 +14,25 @@ Matrix and vector products :toctree: generated/ :nosignatures: - dpnp.dot - dpnp.linalg.multi_dot - dpnp.vdot - dpnp.vecdot - dpnp.linalg.vecdot (Array API compatible) - dpnp.inner - dpnp.outer - dpnp.matmul - dpnp.linalg.matmul (Array API compatible) - dpnp.matvec - dpnp.vecmat - dpnp.tensordot - dpnp.linalg.tensordot (Array API compatible) - dpnp.einsum - dpnp.einsum_path - dpnp.linalg.matrix_power - dpnp.kron - dpnp.linalg.cross (Array API compatible) + dot + linalg.multi_dot + vdot + vecdot + linalg.vecdot (Array API compatible) + inner + outer + linalg.outer + matmul + linalg.matmul (Array API compatible) + matvec + vecmat + tensordot + linalg.tensordot (Array API compatible) + einsum + einsum_path + linalg.matrix_power + kron + linalg.cross (Array API compatible) Decompositions -------------- @@ -40,12 +41,11 @@ Decompositions :toctree: generated/ :nosignatures: - dpnp.linalg.cholesky - dpnp.linalg.outer - dpnp.linalg.qr - dpnp.linalg.lu_factor - dpnp.linalg.svd - dpnp.linalg.svdvals + linalg.cholesky + linalg.qr + linalg.lu_factor + linalg.svd + linalg.svdvals Matrix eigenvalues ------------------ @@ -54,10 +54,10 @@ Matrix eigenvalues :toctree: generated/ :nosignatures: - dpnp.linalg.eig - dpnp.linalg.eigh - dpnp.linalg.eigvals - dpnp.linalg.eigvalsh + linalg.eig + linalg.eigh + linalg.eigvals + linalg.eigvalsh Norms and other numbers ----------------------- @@ -66,15 +66,15 @@ Norms and other numbers :toctree: generated/ :nosignatures: - dpnp.linalg.norm - dpnp.linalg.matrix_norm (Array API compatible) - dpnp.linalg.vector_norm (Array API compatible) - dpnp.linalg.cond - dpnp.linalg.det - dpnp.linalg.matrix_rank - dpnp.linalg.slogdet - dpnp.trace - dpnp.linalg.trace (Array API compatible) + linalg.norm + linalg.matrix_norm (Array API compatible) + linalg.vector_norm (Array API compatible) + linalg.cond + linalg.det + linalg.matrix_rank + linalg.slogdet + trace + linalg.trace (Array API compatible) Solving linear equations -------------------------- @@ -83,13 +83,13 @@ Solving linear equations :toctree: generated/ :nosignatures: - dpnp.linalg.solve - dpnp.linalg.tensorsolve - dpnp.linalg.lstsq - dpnp.linalg.lu_solve - dpnp.linalg.inv - dpnp.linalg.pinv - dpnp.linalg.tensorinv + linalg.solve + linalg.tensorsolve + linalg.lstsq + linalg.lu_solve + linalg.inv + linalg.pinv + linalg.tensorinv Other matrix operations ----------------------- @@ -97,9 +97,9 @@ Other matrix operations :toctree: generated/ :nosignatures: - dpnp.diagonal - dpnp.linalg.diagonal (Array API compatible) - dpnp.linalg.matrix_transpose (Array API compatible) + diagonal + linalg.diagonal (Array API compatible) + linalg.matrix_transpose (Array API compatible) Exceptions ---------- @@ -107,7 +107,7 @@ Exceptions :toctree: generated/ :nosignatures: - dpnp.linalg.LinAlgError + linalg.LinAlgError Linear algebra on several matrices at once ------------------------------------------ diff --git a/doc/reference/logic.rst b/doc/reference/logic.rst index 85e12318d1db..327a2f5e60f8 100644 --- a/doc/reference/logic.rst +++ b/doc/reference/logic.rst @@ -1,7 +1,9 @@ +.. currentmodule:: dpnp + Logic functions =============== -.. https://numpy.org/doc/stable/reference/routines.logic.html +.. hint:: `NumPy API Reference: Logic functions `_ Truth value testing ------------------- @@ -10,8 +12,8 @@ Truth value testing :toctree: generated/ :nosignatures: - dpnp.all - dpnp.any + all + any Array contents @@ -21,11 +23,11 @@ Array contents :toctree: generated/ :nosignatures: - dpnp.isfinite - dpnp.isinf - dpnp.isnan - dpnp.isneginf - dpnp.isposinf + isfinite + isinf + isnan + isneginf + isposinf Array type testing @@ -35,12 +37,12 @@ Array type testing :toctree: generated/ :nosignatures: - dpnp.iscomplex - dpnp.iscomplexobj - dpnp.isfortran - dpnp.isreal - dpnp.isrealobj - dpnp.isscalar + iscomplex + iscomplexobj + isfortran + isreal + isrealobj + isscalar Logical operations @@ -50,10 +52,10 @@ Logical operations :toctree: generated/ :nosignatures: - dpnp.logical_and - dpnp.logical_or - dpnp.logical_not - dpnp.logical_xor + logical_and + logical_or + logical_not + logical_xor Comparison @@ -63,13 +65,13 @@ Comparison :toctree: generated/ :nosignatures: - dpnp.allclose - dpnp.isclose - dpnp.array_equal - dpnp.array_equiv - dpnp.greater - dpnp.greater_equal - dpnp.less - dpnp.less_equal - dpnp.equal - dpnp.not_equal + allclose + isclose + array_equal + array_equiv + greater + greater_equal + less + less_equal + equal + not_equal diff --git a/doc/reference/math.rst b/doc/reference/math.rst index e8ab47b13c3e..fd4af791767a 100644 --- a/doc/reference/math.rst +++ b/doc/reference/math.rst @@ -1,7 +1,9 @@ +.. currentmodule:: dpnp + Mathematical functions ====================== -.. https://numpy.org/doc/stable/reference/routines.math.html +.. hint:: `NumPy API Reference: Mathematical functions `_ Trigonometric functions ----------------------- @@ -10,24 +12,24 @@ Trigonometric functions :toctree: generated/ :nosignatures: - dpnp.sin - dpnp.cos - dpnp.tan - dpnp.arcsin - dpnp.asin - dpnp.arccos - dpnp.acos - dpnp.arctan - dpnp.atan - dpnp.hypot - dpnp.arctan2 - dpnp.atan2 - dpnp.degrees - dpnp.radians - dpnp.unwrap - dpnp.deg2rad - dpnp.rad2deg - dpnp.reduce_hypot + sin + cos + tan + arcsin + asin + arccos + acos + arctan + atan + hypot + arctan2 + atan2 + degrees + radians + unwrap + deg2rad + rad2deg + reduce_hypot Hyperbolic functions @@ -37,15 +39,15 @@ Hyperbolic functions :toctree: generated/ :nosignatures: - dpnp.sinh - dpnp.cosh - dpnp.tanh - dpnp.arcsinh - dpnp.asinh - dpnp.arccosh - dpnp.acosh - dpnp.arctanh - dpnp.atanh + sinh + cosh + tanh + arcsinh + asinh + arccosh + acosh + arctanh + atanh Rounding @@ -55,13 +57,13 @@ Rounding :toctree: generated/ :nosignatures: - dpnp.round - dpnp.around - dpnp.rint - dpnp.fix - dpnp.floor - dpnp.ceil - dpnp.trunc + round + around + rint + fix + floor + ceil + trunc Sums, products, differences @@ -71,21 +73,21 @@ Sums, products, differences :toctree: generated/ :nosignatures: - dpnp.prod - dpnp.sum - dpnp.nanprod - dpnp.nansum - dpnp.cumulative_sum - dpnp.cumulative_prod - dpnp.cumprod - dpnp.cumsum - dpnp.nancumprod - dpnp.nancumsum - dpnp.diff - dpnp.ediff1d - dpnp.gradient - dpnp.cross - dpnp.trapezoid + prod + sum + nanprod + nansum + cumulative_sum + cumulative_prod + cumprod + cumsum + nancumprod + nancumsum + diff + ediff1d + gradient + cross + trapezoid Exponents and logarithms @@ -95,17 +97,17 @@ Exponents and logarithms :toctree: generated/ :nosignatures: - dpnp.exp - dpnp.expm1 - dpnp.exp2 - dpnp.log - dpnp.log10 - dpnp.log2 - dpnp.log1p - dpnp.logaddexp - dpnp.logaddexp2 - dpnp.logsumexp - dpnp.cumlogsumexp + exp + expm1 + exp2 + log + log10 + log2 + log1p + logaddexp + logaddexp2 + logsumexp + cumlogsumexp Other special functions @@ -115,8 +117,8 @@ Other special functions :toctree: generated/ :nosignatures: - dpnp.i0 - dpnp.sinc + i0 + sinc Floating point routines @@ -126,12 +128,12 @@ Floating point routines :toctree: generated/ :nosignatures: - dpnp.signbit - dpnp.copysign - dpnp.frexp - dpnp.ldexp - dpnp.nextafter - dpnp.spacing + signbit + copysign + frexp + ldexp + nextafter + spacing Rational routines @@ -141,8 +143,8 @@ Rational routines :toctree: generated/ :nosignatures: - dpnp.lcm - dpnp.gcd + lcm + gcd Arithmetic operations @@ -152,24 +154,24 @@ Arithmetic operations :toctree: generated/ :nosignatures: - dpnp.add - dpnp.reciprocal - dpnp.positive - dpnp.negative - dpnp.multiply - dpnp.divide - dpnp.power - dpnp.pow - dpnp.subtract - dpnp.true_divide - dpnp.floor_divide - dpnp.float_power - - dpnp.fmod - dpnp.mod - dpnp.modf - dpnp.remainder - dpnp.divmod + add + reciprocal + positive + negative + multiply + divide + power + pow + subtract + true_divide + floor_divide + float_power + + fmod + mod + modf + remainder + divmod Handling complex numbers @@ -179,12 +181,12 @@ Handling complex numbers :toctree: generated/ :nosignatures: - dpnp.angle - dpnp.real - dpnp.imag - dpnp.conj - dpnp.conjugate - dpnp.proj + angle + real + imag + conj + conjugate + proj Extrema finding @@ -194,17 +196,17 @@ Extrema finding :toctree: generated/ :nosignatures: - dpnp.maximum - dpnp.max - dpnp.amax - dpnp.fmax - dpnp.nanmax + maximum + max + amax + fmax + nanmax - dpnp.minimum - dpnp.min - dpnp.amin - dpnp.fmin - dpnp.nanmin + minimum + min + amin + fmin + nanmin Miscellaneous @@ -214,21 +216,21 @@ Miscellaneous :toctree: generated/ :nosignatures: - dpnp.convolve - dpnp.clip + convolve + clip - dpnp.sqrt - dpnp.cbrt - dpnp.square - dpnp.rsqrt + sqrt + cbrt + square + rsqrt - dpnp.abs - dpnp.absolute - dpnp.fabs - dpnp.sign - dpnp.heaviside + abs + absolute + fabs + sign + heaviside - dpnp.nan_to_num - dpnp.real_if_close + nan_to_num + real_if_close - dpnp.interp + interp diff --git a/doc/reference/ndarray.rst b/doc/reference/ndarray.rst index 9a03c680a012..321f2fe95b94 100644 --- a/doc/reference/ndarray.rst +++ b/doc/reference/ndarray.rst @@ -1,17 +1,19 @@ -Multi-Dimensional Array (ndarray) -================================= +.. currentmodule:: dpnp -:class:`dpnp.ndarray` is the DPNP counterpart of NumPy :class:`numpy.ndarray`. +The N-dimensional array (:class:`ndarray `) +========================================================= -For the basic concept of ``ndarray``\s, please refer to the `NumPy documentation `_. +:class:`ndarray` is the DPNP counterpart of NumPy :class:`numpy.ndarray`. + +For the basic concept of ``ndarray``\s, please refer to the `NumPy documentation `_. .. autosummary:: :toctree: generated/ :nosignatures: - dpnp.ndarray - dpnp.dpnp_array.dpnp_array + ndarray + dpnp_array.dpnp_array Constructing arrays @@ -19,13 +21,13 @@ Constructing arrays New arrays can be constructed using the routines detailed in :ref:`Array Creation Routines `, and also by using the low-level -:class:`dpnp.ndarray` constructor: +:class:`ndarray` constructor: .. autosummary:: :toctree: generated/ :nosignatures: - dpnp.ndarray + ndarray Indexing arrays @@ -58,19 +60,19 @@ of the array: :toctree: generated/ :nosignatures: - dpnp.ndarray.flags - dpnp.ndarray.shape - dpnp.ndarray.strides - dpnp.ndarray.ndim - dpnp.ndarray.data - dpnp.ndarray.size - dpnp.ndarray.itemsize - dpnp.ndarray.nbytes - dpnp.ndarray.device - dpnp.ndarray.sycl_context - dpnp.ndarray.sycl_device - dpnp.ndarray.sycl_queue - dpnp.ndarray.usm_type + ndarray.flags + ndarray.shape + ndarray.strides + ndarray.ndim + ndarray.data + ndarray.size + ndarray.itemsize + ndarray.nbytes + ndarray.device + ndarray.sycl_context + ndarray.sycl_device + ndarray.sycl_queue + ndarray.usm_type Data type @@ -79,13 +81,13 @@ Data type .. seealso:: :ref:`Available array data types ` The data type object associated with the array can be found in the -:attr:`dtype ` attribute: +:attr:`dtype ` attribute: .. autosummary:: :toctree: generated/ :nosignatures: - dpnp.ndarray.dtype + ndarray.dtype Other attributes @@ -95,11 +97,11 @@ Other attributes :toctree: generated/ :nosignatures: - dpnp.ndarray.T - dpnp.ndarray.mT - dpnp.ndarray.real - dpnp.ndarray.imag - dpnp.ndarray.flat + ndarray.T + ndarray.mT + ndarray.real + ndarray.imag + ndarray.flat Special attributes @@ -109,35 +111,35 @@ Special attributes :toctree: generated/ :nosignatures: - dpnp.ndarray.__sycl_usm_array_interface__ - dpnp.ndarray.__usm_ndarray__ + ndarray.__sycl_usm_array_interface__ + ndarray.__usm_ndarray__ Array methods ------------- -An :class:`dpnp.ndarray` object has many methods which operate on or with +An :class:`ndarray` object has many methods which operate on or with the array in some fashion, typically returning an array result. These methods are briefly explained below. (Each method's docstring has a more complete description.) For the following methods there are also corresponding functions in -:mod:`dpnp`: :func:`all `, :func:`any `, -:func:`argmax `, :func:`argmin `, -:func:`argpartition `, :func:`argsort `, -:func:`choose `, :func:`clip `, -:func:`compress `, :func:`copy `, -:func:`cumprod `, :func:`cumsum `, -:func:`diagonal `, :func:`imag `, -:func:`max `, :func:`mean `, :func:`min `, -:func:`nonzero `, :func:`partition `, -:func:`prod `, :func:`put `, -:func:`ravel `, :func:`real `, :func:`repeat `, -:func:`reshape `, :func:`round `, -:func:`searchsorted `, :func:`sort `, -:func:`squeeze `, :func:`std `, :func:`sum `, -:func:`swapaxes `, :func:`take `, :func:`trace `, -:func:`transpose `, :func:`var `. +:mod:`dpnp`: :func:`all `, :func:`any `, +:func:`argmax `, :func:`argmin `, +:func:`argpartition `, :func:`argsort `, +:func:`choose `, :func:`clip `, +:func:`compress `, :func:`copy `, +:func:`cumprod `, :func:`cumsum `, +:func:`diagonal `, :func:`imag `, +:func:`max `, :func:`mean `, :func:`min `, +:func:`nonzero `, :func:`partition `, +:func:`prod `, :func:`put `, +:func:`ravel `, :func:`real `, :func:`repeat `, +:func:`reshape `, :func:`round `, +:func:`searchsorted `, :func:`sort `, +:func:`squeeze `, :func:`std `, :func:`sum `, +:func:`swapaxes `, :func:`take `, :func:`trace `, +:func:`transpose `, :func:`var `. Array conversion @@ -147,20 +149,20 @@ Array conversion :toctree: generated/ :nosignatures: - dpnp.ndarray.item - dpnp.ndarray.tolist - dpnp.ndarray.tobytes - dpnp.ndarray.tofile - dpnp.ndarray.dump - dpnp.ndarray.dumps - dpnp.ndarray.astype - dpnp.ndarray.byteswap - dpnp.ndarray.copy - dpnp.ndarray.view - dpnp.ndarray.getfield - dpnp.ndarray.setflags - dpnp.ndarray.fill - dpnp.ndarray.get_array + ndarray.item + ndarray.tolist + ndarray.tobytes + ndarray.tofile + ndarray.dump + ndarray.dumps + ndarray.astype + ndarray.byteswap + ndarray.copy + ndarray.view + ndarray.getfield + ndarray.setflags + ndarray.fill + ndarray.get_array Shape manipulation @@ -173,13 +175,13 @@ replaced with ``n`` integers which will be interpreted as an n-tuple. :toctree: generated/ :nosignatures: - dpnp.ndarray.reshape - dpnp.ndarray.resize - dpnp.ndarray.transpose - dpnp.ndarray.swapaxes - dpnp.ndarray.flatten - dpnp.ndarray.ravel - dpnp.ndarray.squeeze + ndarray.reshape + ndarray.resize + ndarray.transpose + ndarray.swapaxes + ndarray.flatten + ndarray.ravel + ndarray.squeeze Item selection and manipulation @@ -194,18 +196,18 @@ the operation should proceed. :toctree: generated/ :nosignatures: - dpnp.ndarray.take - dpnp.ndarray.put - dpnp.ndarray.repeat - dpnp.ndarray.choose - dpnp.ndarray.sort - dpnp.ndarray.argsort - dpnp.ndarray.partition - dpnp.ndarray.argpartition - dpnp.ndarray.searchsorted - dpnp.ndarray.nonzero - dpnp.ndarray.compress - dpnp.ndarray.diagonal + ndarray.take + ndarray.put + ndarray.repeat + ndarray.choose + ndarray.sort + ndarray.argsort + ndarray.partition + ndarray.argpartition + ndarray.searchsorted + ndarray.nonzero + ndarray.compress + ndarray.diagonal Calculation @@ -227,7 +229,7 @@ reduction using a larger data type. For several methods, an optional *out* argument can also be provided and the result will be placed into the output array given. The *out* argument must be -an :class:`dpnp.ndarray` and have the same number of elements as the result +an :class:`ndarray` and have the same number of elements as the result array. It can have a different data type in which case casting will be performed. @@ -235,32 +237,32 @@ performed. :toctree: generated/ :nosignatures: - dpnp.ndarray.max - dpnp.ndarray.argmax - dpnp.ndarray.min - dpnp.ndarray.argmin - dpnp.ndarray.clip - dpnp.ndarray.conj - dpnp.ndarray.conjugate - dpnp.ndarray.round - dpnp.ndarray.trace - dpnp.ndarray.sum - dpnp.ndarray.cumsum - dpnp.ndarray.mean - dpnp.ndarray.var - dpnp.ndarray.std - dpnp.ndarray.prod - dpnp.ndarray.cumprod - dpnp.ndarray.all - dpnp.ndarray.any + ndarray.max + ndarray.argmax + ndarray.min + ndarray.argmin + ndarray.clip + ndarray.conj + ndarray.conjugate + ndarray.round + ndarray.trace + ndarray.sum + ndarray.cumsum + ndarray.mean + ndarray.var + ndarray.std + ndarray.prod + ndarray.cumprod + ndarray.all + ndarray.any Arithmetic, matrix multiplication, and comparison operations ------------------------------------------------------------ -Arithmetic and comparison operations on :class:`dpnp.ndarrays ` +Arithmetic and comparison operations on :class:`ndarrays ` are defined as element-wise operations, and generally yield -:class:`dpnp.ndarray` objects as results. +:class:`ndarray` objects as results. Each of the arithmetic operations (``+``, ``-``, ``*``, ``/``, ``//``, ``%``, ``divmod()``, ``**`` or ``pow()``, ``<<``, ``>>``, ``&``, ``^``, ``|``, ``~``) @@ -276,12 +278,12 @@ Comparison operators: :toctree: generated/ :nosignatures: - dpnp.ndarray.__lt__ - dpnp.ndarray.__le__ - dpnp.ndarray.__gt__ - dpnp.ndarray.__ge__ - dpnp.ndarray.__eq__ - dpnp.ndarray.__ne__ + ndarray.__lt__ + ndarray.__le__ + ndarray.__gt__ + ndarray.__ge__ + ndarray.__eq__ + ndarray.__ne__ Truth value of an array (:class:`bool() `): @@ -289,15 +291,15 @@ Truth value of an array (:class:`bool() `): :toctree: generated/ :nosignatures: - dpnp.ndarray.__bool__ + ndarray.__bool__ .. note:: Truth-value testing of an array invokes - :meth:`dpnp.ndarray.__bool__`, which raises an error if the number of + :meth:`ndarray.__bool__`, which raises an error if the number of elements in the array is not 1, because the truth value - of such arrays is ambiguous. Use :meth:`.any() ` and - :meth:`.all() ` instead to be clear about what is meant + of such arrays is ambiguous. Use :meth:`.any() ` and + :meth:`.all() ` instead to be clear about what is meant in such cases. (If you wish to check for whether an array is empty, use for example ``.size > 0``.) @@ -308,10 +310,10 @@ Unary operations: :toctree: generated/ :nosignatures: - dpnp.ndarray.__neg__ - dpnp.ndarray.__pos__ - dpnp.ndarray.__abs__ - dpnp.ndarray.__invert__ + ndarray.__neg__ + ndarray.__pos__ + ndarray.__abs__ + ndarray.__invert__ Arithmetic: @@ -320,19 +322,19 @@ Arithmetic: :toctree: generated/ :nosignatures: - dpnp.ndarray.__add__ - dpnp.ndarray.__sub__ - dpnp.ndarray.__mul__ - dpnp.ndarray.__truediv__ - dpnp.ndarray.__floordiv__ - dpnp.ndarray.__mod__ - dpnp.ndarray.__divmod__ - dpnp.ndarray.__pow__ - dpnp.ndarray.__lshift__ - dpnp.ndarray.__rshift__ - dpnp.ndarray.__and__ - dpnp.ndarray.__or__ - dpnp.ndarray.__xor__ + ndarray.__add__ + ndarray.__sub__ + ndarray.__mul__ + ndarray.__truediv__ + ndarray.__floordiv__ + ndarray.__mod__ + ndarray.__divmod__ + ndarray.__pow__ + ndarray.__lshift__ + ndarray.__rshift__ + ndarray.__and__ + ndarray.__or__ + ndarray.__xor__ Arithmetic, reflected: @@ -341,18 +343,18 @@ Arithmetic, reflected: :toctree: generated/ :nosignatures: - dpnp.ndarray.__radd__ - dpnp.ndarray.__rsub__ - dpnp.ndarray.__rmul__ - dpnp.ndarray.__rtruediv__ - dpnp.ndarray.__rfloordiv__ - dpnp.ndarray.__rmod__ - dpnp.ndarray.__rpow__ - dpnp.ndarray.__rlshift__ - dpnp.ndarray.__rrshift__ - dpnp.ndarray.__rand__ - dpnp.ndarray.__ror__ - dpnp.ndarray.__rxor__ + ndarray.__radd__ + ndarray.__rsub__ + ndarray.__rmul__ + ndarray.__rtruediv__ + ndarray.__rfloordiv__ + ndarray.__rmod__ + ndarray.__rpow__ + ndarray.__rlshift__ + ndarray.__rrshift__ + ndarray.__rand__ + ndarray.__ror__ + ndarray.__rxor__ Arithmetic, in-place: @@ -361,18 +363,18 @@ Arithmetic, in-place: :toctree: generated/ :nosignatures: - dpnp.ndarray.__iadd__ - dpnp.ndarray.__isub__ - dpnp.ndarray.__imul__ - dpnp.ndarray.__itruediv__ - dpnp.ndarray.__ifloordiv__ - dpnp.ndarray.__imod__ - dpnp.ndarray.__ipow__ - dpnp.ndarray.__ilshift__ - dpnp.ndarray.__irshift__ - dpnp.ndarray.__iand__ - dpnp.ndarray.__ior__ - dpnp.ndarray.__ixor__ + ndarray.__iadd__ + ndarray.__isub__ + ndarray.__imul__ + ndarray.__itruediv__ + ndarray.__ifloordiv__ + ndarray.__imod__ + ndarray.__ipow__ + ndarray.__ilshift__ + ndarray.__irshift__ + ndarray.__iand__ + ndarray.__ior__ + ndarray.__ixor__ Matrix Multiplication: @@ -381,9 +383,9 @@ Matrix Multiplication: :toctree: generated/ :nosignatures: - dpnp.ndarray.__matmul__ - dpnp.ndarray.__rmatmul__ - dpnp.ndarray.__imatmul__ + ndarray.__matmul__ + ndarray.__rmatmul__ + ndarray.__imatmul__ Special methods @@ -395,10 +397,10 @@ For standard library functions: :toctree: generated/ :nosignatures: - dpnp.ndarray.__copy__ - dpnp.ndarray.__deepcopy__ - .. dpnp.ndarray.__reduce__ - dpnp.ndarray.__setstate__ + ndarray.__copy__ + ndarray.__deepcopy__ + .. ndarray.__reduce__ + ndarray.__setstate__ Basic customization: @@ -406,12 +408,12 @@ Basic customization: :toctree: generated/ :nosignatures: - dpnp.ndarray.__new__ - dpnp.ndarray.__array__ - dpnp.ndarray.__array_namespace__ - dpnp.ndarray.__array_wrap__ - dpnp.ndarray.__dlpack__ - dpnp.ndarray.__dlpack_device__ + ndarray.__new__ + ndarray.__array__ + ndarray.__array_namespace__ + ndarray.__array_wrap__ + ndarray.__dlpack__ + ndarray.__dlpack_device__ Container customization: (see :ref:`Indexing `) @@ -419,11 +421,11 @@ Container customization: (see :ref:`Indexing `) :toctree: generated/ :nosignatures: - dpnp.ndarray.__len__ - dpnp.ndarray.__iter__ - dpnp.ndarray.__getitem__ - dpnp.ndarray.__setitem__ - dpnp.ndarray.__contains__ + ndarray.__len__ + ndarray.__iter__ + ndarray.__getitem__ + ndarray.__setitem__ + ndarray.__contains__ Conversion; the operations :class:`int() `, :class:`float() `, :class:`complex() ` and :func:`operator.index() `. @@ -434,10 +436,10 @@ and return the appropriate scalar. :toctree: generated/ :nosignatures: - dpnp.ndarray.__index__ - dpnp.ndarray.__int__ - dpnp.ndarray.__float__ - dpnp.ndarray.__complex__ + ndarray.__index__ + ndarray.__int__ + ndarray.__float__ + ndarray.__complex__ String representations: @@ -445,5 +447,5 @@ String representations: :toctree: generated/ :nosignatures: - dpnp.ndarray.__str__ - dpnp.ndarray.__repr__ + ndarray.__str__ + ndarray.__repr__ diff --git a/doc/reference/other.rst b/doc/reference/other.rst index 2ac3f03fd3cc..c95530150700 100644 --- a/doc/reference/other.rst +++ b/doc/reference/other.rst @@ -1,7 +1,19 @@ +.. currentmodule:: dpnp + Miscellaneous routines ====================== -.. https://numpy.org/doc/stable/reference/routines.other.html +.. hint:: `NumPy API Reference: Miscellaneous routines `_ + +Memory ranges +------------- + +.. autosummary:: + :toctree: generated/ + :nosignatures: + + byte_bounds + Utility ------- @@ -10,8 +22,7 @@ Utility :toctree: generated/ :nosignatures: - dpnp.byte_bounds - dpnp.get_include - dpnp.show_config - dpnp.show_runtime - dpnp.broadcast_shapes + get_include + show_config + show_runtime + broadcast_shapes diff --git a/doc/reference/polynomials.rst b/doc/reference/polynomials.rst index d86cedfe49a1..6b7868b9a6e4 100644 --- a/doc/reference/polynomials.rst +++ b/doc/reference/polynomials.rst @@ -1,7 +1,9 @@ +.. currentmodule:: dpnp + Polynomials =========== -.. https://numpy.org/doc/stable/reference/routines.polynomials.html +.. hint:: `NumPy API Reference: Polynomials `_ Polynomial Package ------------------ @@ -14,8 +16,8 @@ Polynomial Module :nosignatures: .. polynomial module is not implemented yet - .. dpnp.polynomial.polynomial.polyvander - .. dpnp.polynomial.polynomial.polycompanion + .. polynomial.polynomial.polyvander + .. polynomial.polynomial.polycompanion Polyutils @@ -26,9 +28,9 @@ Polyutils :nosignatures: .. polyutils module is not implemented yet - .. dpnp.polynomial.polyutils.as_series - .. dpnp.polynomial.polyutils.trimseq - .. dpnp.polynomial.polyutils.trimcoef + .. polynomial.polyutils.as_series + .. polynomial.polyutils.trimseq + .. polynomial.polyutils.trimcoef Poly1d @@ -41,9 +43,9 @@ Basics :toctree: generated/ :nosignatures: - dpnp.poly1d - dpnp.polyval - dpnp.roots + poly1d + polyval + roots Arithmetic @@ -53,6 +55,6 @@ Arithmetic :toctree: generated/ :nosignatures: - dpnp.polyadd - dpnp.polysub - dpnp.polymul + polyadd + polysub + polymul diff --git a/doc/reference/random.rst b/doc/reference/random.rst index d58b78ca19f9..55ac0271307a 100644 --- a/doc/reference/random.rst +++ b/doc/reference/random.rst @@ -1,8 +1,9 @@ -Random sampling (``dpnp.random``) -================================= +.. currentmodule:: dpnp.random -.. https://numpy.org/doc/stable/reference/random/legacy.html +Random sampling (:mod:`dpnp.random`) +==================================== +.. hint:: `NumPy API Reference: Legacy random generation `_ Simple random data ------------------ @@ -11,16 +12,16 @@ Simple random data :toctree: generated/ :nosignatures: - dpnp.random.rand - dpnp.random.randn - dpnp.random.randint - dpnp.random.random_integers - dpnp.random.random_sample - dpnp.random.random - dpnp.random.ranf - dpnp.random.sample - dpnp.random.choice - dpnp.random.bytes + rand + randn + randint + random_integers + random_sample + random + ranf + sample + choice + bytes Permutations @@ -30,8 +31,8 @@ Permutations :toctree: generated/ :nosignatures: - dpnp.random.shuffle - dpnp.random.permutation + shuffle + permutation Distributions @@ -41,41 +42,41 @@ Distributions :toctree: generated/ :nosignatures: - dpnp.random.beta - dpnp.random.binomial - dpnp.random.chisquare - dpnp.random.dirichlet - dpnp.random.exponential - dpnp.random.f - dpnp.random.gamma - dpnp.random.geometric - dpnp.random.gumbel - dpnp.random.hypergeometric - dpnp.random.laplace - dpnp.random.logistic - dpnp.random.lognormal - dpnp.random.logseries - dpnp.random.multinomial - dpnp.random.multivariate_normal - dpnp.random.negative_binomial - dpnp.random.noncentral_chisquare - dpnp.random.noncentral_f - dpnp.random.normal - dpnp.random.pareto - dpnp.random.poisson - dpnp.random.power - dpnp.random.rayleigh - dpnp.random.standard_cauchy - dpnp.random.standard_exponential - dpnp.random.standard_gamma - dpnp.random.standard_normal - dpnp.random.standard_t - dpnp.random.triangular - dpnp.random.uniform - dpnp.random.vonmises - dpnp.random.wald - dpnp.random.weibull - dpnp.random.zipf + beta + binomial + chisquare + dirichlet + exponential + f + gamma + geometric + gumbel + hypergeometric + laplace + logistic + lognormal + logseries + multinomial + multivariate_normal + negative_binomial + noncentral_chisquare + noncentral_f + normal + pareto + poisson + power + rayleigh + standard_cauchy + standard_exponential + standard_gamma + standard_normal + standard_t + triangular + uniform + vonmises + wald + weibull + zipf Random generator @@ -85,7 +86,7 @@ Random generator :toctree: generated/ :nosignatures: - dpnp.random.RandomState - dpnp.random.seed - dpnp.random.get_random_state - dpnp.random.set_random_state + RandomState + seed + get_random_state + set_random_state diff --git a/doc/reference/scipy_linalg.rst b/doc/reference/scipy_linalg.rst index 0ab8d5a248ff..c45fa55de721 100644 --- a/doc/reference/scipy_linalg.rst +++ b/doc/reference/scipy_linalg.rst @@ -3,7 +3,7 @@ Linear algebra (:mod:`dpnp.scipy.linalg`) ========================================= -.. Hint:: `SciPy API Reference: Linear algebra (scipy.linalg) `_ +.. hint:: `SciPy API Reference: Linear algebra (scipy.linalg) `_ Decompositions -------------- diff --git a/doc/reference/scipy_special.rst b/doc/reference/scipy_special.rst index 603f7bfebb08..ec501b82625b 100644 --- a/doc/reference/scipy_special.rst +++ b/doc/reference/scipy_special.rst @@ -3,7 +3,7 @@ Special functions (:mod:`dpnp.scipy.special`) ======================================= -.. Hint:: `SciPy API Reference: Special functions (scipy.special) `_ +.. hint:: `SciPy API Reference: Special functions (scipy.special) `_ Error function and Fresnel integrals ------------------------------------ diff --git a/doc/reference/set.rst b/doc/reference/set.rst index 90c3b7989a56..702e58bb87d5 100644 --- a/doc/reference/set.rst +++ b/doc/reference/set.rst @@ -1,7 +1,9 @@ +.. currentmodule:: dpnp + Set routines ============ -.. https://numpy.org/doc/stable/reference/routines.set.html +.. hint:: `NumPy API Reference: Set routines `_ Making proper sets ------------------ @@ -9,11 +11,11 @@ Making proper sets :toctree: generated/ :nosignatures: - dpnp.unique - dpnp.unique_all - dpnp.unique_counts - dpnp.unique_inverse - dpnp.unique_values + unique + unique_all + unique_counts + unique_inverse + unique_values Boolean operations ------------------ @@ -21,9 +23,9 @@ Boolean operations :toctree: generated/ :nosignatures: - dpnp.in1d - dpnp.intersect1d - dpnp.isin - dpnp.setdiff1d - dpnp.setxor1d - dpnp.union1d + in1d + intersect1d + isin + setdiff1d + setxor1d + union1d diff --git a/doc/reference/sort.rst b/doc/reference/sort.rst index 22edf047f442..2f73aa775406 100644 --- a/doc/reference/sort.rst +++ b/doc/reference/sort.rst @@ -1,7 +1,9 @@ +.. currentmodule:: dpnp + Sorting, searching, and counting ================================ -.. https://numpy.org/doc/stable/reference/routines.sort.html +.. hint:: `NumPy API Reference: Sorting, searching, and counting `_ Sorting ------- @@ -10,12 +12,12 @@ Sorting :toctree: generated/ :nosignatures: - dpnp.sort - dpnp.lexsort - dpnp.argsort - dpnp.sort_complex - dpnp.partition - dpnp.argpartition + sort + lexsort + argsort + sort_complex + partition + argpartition .. seealso:: :func:`dpnp.ndarray.sort` @@ -27,16 +29,16 @@ Searching :toctree: generated/ :nosignatures: - dpnp.argmax - dpnp.nanargmax - dpnp.argmin - dpnp.nanargmin - dpnp.argwhere - dpnp.nonzero - dpnp.flatnonzero - dpnp.where - dpnp.searchsorted - dpnp.extract + argmax + nanargmax + argmin + nanargmin + argwhere + nonzero + flatnonzero + where + searchsorted + extract Counting -------- @@ -45,4 +47,4 @@ Counting :toctree: generated/ :nosignatures: - dpnp.count_nonzero + count_nonzero diff --git a/doc/reference/statistics.rst b/doc/reference/statistics.rst index 56218fb23fa9..89c97de8190e 100644 --- a/doc/reference/statistics.rst +++ b/doc/reference/statistics.rst @@ -1,7 +1,9 @@ +.. currentmodule:: dpnp + Statistics ========== -.. https://numpy.org/doc/stable/reference/routines.statistics.html +.. hint:: `NumPy API Reference: Statistics `_ Order statistics ---------------- @@ -10,11 +12,11 @@ Order statistics :toctree: generated/ :nosignatures: - dpnp.ptp - dpnp.percentile - dpnp.nanpercentile - dpnp.quantile - dpnp.nanquantile + ptp + percentile + nanpercentile + quantile + nanquantile Averages and variances @@ -24,15 +26,15 @@ Averages and variances :toctree: generated/ :nosignatures: - dpnp.median - dpnp.average - dpnp.mean - dpnp.std - dpnp.var - dpnp.nanmedian - dpnp.nanmean - dpnp.nanstd - dpnp.nanvar + median + average + mean + std + var + nanmedian + nanmean + nanstd + nanvar Correlations @@ -42,9 +44,9 @@ Correlations :toctree: generated/ :nosignatures: - dpnp.corrcoef - dpnp.correlate - dpnp.cov + corrcoef + correlate + cov Histograms @@ -54,9 +56,9 @@ Histograms :toctree: generated/ :nosignatures: - dpnp.histogram - dpnp.histogram2d - dpnp.histogramdd - dpnp.bincount - dpnp.histogram_bin_edges - dpnp.digitize + histogram + histogram2d + histogramdd + bincount + histogram_bin_edges + digitize diff --git a/doc/reference/ufunc.rst b/doc/reference/ufunc.rst index 0ecc63950154..83f81a8f6e7d 100644 --- a/doc/reference/ufunc.rst +++ b/doc/reference/ufunc.rst @@ -1,9 +1,11 @@ .. _ufunc: -Universal Functions (ufunc) -=========================== +.. currentmodule:: dpnp -.. https://numpy.org/doc/stable/reference/ufuncs.html +Universal functions +=================== + +.. hint:: `NumPy API Reference: Universal functions (numpy.ufunc) `_ DPNP provides universal functions (a.k.a. ufuncs) to support various element-wise operations. @@ -17,46 +19,46 @@ Math operations :toctree: generated/ :nosignatures: - dpnp.add - dpnp.subtract - dpnp.multiply - dpnp.matmul - dpnp.divide - dpnp.logaddexp - dpnp.logaddexp2 - dpnp.true_divide - dpnp.floor_divide - dpnp.negative - dpnp.positive - dpnp.power - dpnp.pow - dpnp.float_power - dpnp.remainder - dpnp.mod - dpnp.fmod - dpnp.divmod - dpnp.absolute - dpnp.fabs - dpnp.rint - dpnp.sign - dpnp.heaviside - dpnp.conj - dpnp.conjugate - dpnp.exp - dpnp.exp2 - dpnp.log - dpnp.log2 - dpnp.log10 - dpnp.expm1 - dpnp.log1p - dpnp.proj - dpnp.sqrt - dpnp.square - dpnp.cbrt - dpnp.reciprocal - dpnp.rsqrt - dpnp.gcd - dpnp.lcm + add + subtract + multiply + matmul + divide + logaddexp + logaddexp2 + true_divide + floor_divide + negative + positive + power + pow + float_power + remainder + mod + fmod + divmod + absolute + fabs + rint + sign + heaviside + conj + conjugate + exp + exp2 + log + log2 + log10 + expm1 + log1p + proj + sqrt + square + cbrt + reciprocal + rsqrt + gcd + lcm .. tip:: @@ -79,31 +81,31 @@ The ratio of degrees to radians is :math:`180^{\circ}/\pi.` :toctree: generated/ :nosignatures: - dpnp.sin - dpnp.cos - dpnp.tan - dpnp.arcsin - dpnp.asin - dpnp.arccos - dpnp.acos - dpnp.arctan - dpnp.atan - dpnp.arctan2 - dpnp.atan2 - dpnp.hypot - dpnp.sinh - dpnp.cosh - dpnp.tanh - dpnp.arcsinh - dpnp.asinh - dpnp.arccosh - dpnp.acosh - dpnp.arctanh - dpnp.atanh - dpnp.degrees - dpnp.radians - dpnp.deg2rad - dpnp.rad2deg + sin + cos + tan + arcsin + asin + arccos + acos + arctan + atan + arctan2 + atan2 + hypot + sinh + cosh + tanh + arcsinh + asinh + arccosh + acosh + arctanh + atanh + degrees + radians + deg2rad + rad2deg Bit-twiddling functions @@ -113,17 +115,17 @@ Bit-twiddling functions :toctree: generated/ :nosignatures: - dpnp.bitwise_and - dpnp.bitwise_not - dpnp.bitwise_or - dpnp.bitwise_xor - dpnp.invert - dpnp.bitwise_invert - dpnp.left_shift - dpnp.bitwise_left_shift - dpnp.right_shift - dpnp.bitwise_right_shift - dpnp.bitwise_count + bitwise_and + bitwise_not + bitwise_or + bitwise_xor + invert + bitwise_invert + left_shift + bitwise_left_shift + right_shift + bitwise_right_shift + bitwise_count Comparison functions @@ -133,22 +135,22 @@ Comparison functions :toctree: generated/ :nosignatures: - dpnp.greater - dpnp.greater_equal - dpnp.less - dpnp.less_equal - dpnp.not_equal - dpnp.equal + greater + greater_equal + less + less_equal + not_equal + equal - dpnp.logical_and - dpnp.logical_or - dpnp.logical_xor - dpnp.logical_not + logical_and + logical_or + logical_xor + logical_not - dpnp.maximum - dpnp.minimum - dpnp.fmax - dpnp.fmin + maximum + minimum + fmax + fmin Floating functions @@ -158,18 +160,18 @@ Floating functions :toctree: generated/ :nosignatures: - dpnp.isfinite - dpnp.isinf - dpnp.isnan - dpnp.fabs - dpnp.signbit - dpnp.copysign - dpnp.nextafter - dpnp.spacing - dpnp.modf - dpnp.ldexp - dpnp.frexp - dpnp.fmod - dpnp.floor - dpnp.ceil - dpnp.trunc + isfinite + isinf + isnan + fabs + signbit + copysign + nextafter + spacing + modf + ldexp + frexp + fmod + floor + ceil + trunc diff --git a/doc/reference/window.rst b/doc/reference/window.rst index 9b943b1ff5a8..14c854cf3e3f 100644 --- a/doc/reference/window.rst +++ b/doc/reference/window.rst @@ -1,7 +1,9 @@ +.. currentmodule:: dpnp + Window functions ================ -.. https://numpy.org/doc/stable/reference/routines.window.html +.. hint:: `NumPy API Reference: Window functions `_ Various windows --------------- @@ -10,8 +12,8 @@ Various windows :toctree: generated/ :nosignatures: - dpnp.bartlett - dpnp.blackman - dpnp.hamming - dpnp.hanning - dpnp.kaiser + bartlett + blackman + hamming + hanning + kaiser diff --git a/dpnp/dpnp_iface_mathematical.py b/dpnp/dpnp_iface_mathematical.py index 6fe165632aea..4fcfb55fc8c6 100644 --- a/dpnp/dpnp_iface_mathematical.py +++ b/dpnp/dpnp_iface_mathematical.py @@ -2343,7 +2343,7 @@ def ediff1d(ary, to_end=None, to_begin=None): ) _GCD_DOCSTRING = r""" -Returns the greatest common divisor of :math:`\abs{x1}` and :math:`\abs{x2}`. +Returns the greatest common divisor of :math:`|x_1|` and :math:`|x_2|`. For full documentation refer to :obj:`numpy.gcd`. @@ -2962,7 +2962,7 @@ def interp(x, xp, fp, left=None, right=None, period=None): _LCM_DOCSTRING = r""" -Returns the lowest common multiple of :math:`\abs{x1}` and :math:`\abs{x2}`. +Returns the lowest common multiple of :math:`|x_1|` and :math:`|x_2|`. For full documentation refer to :obj:`numpy.lcm`.