Skip to content

Commit

Permalink
Implement new aliases introduced in NumPy 2.0 - Part II (#2099)
Browse files Browse the repository at this point in the history
* implement new aliases introduced in NumPy 2.0

* address comments

* update linalg.rst
  • Loading branch information
vtavana authored Oct 11, 2024
1 parent 63e641f commit bd6562a
Show file tree
Hide file tree
Showing 28 changed files with 1,066 additions and 246 deletions.
4 changes: 4 additions & 0 deletions doc/known_words.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
al
ary
backend
bitwise
boolean
Expand Down Expand Up @@ -31,6 +32,7 @@ Fortran
Frobenius
fs
getter
Golub
Hadamard
Hypergeometric
iinfo
Expand All @@ -51,8 +53,10 @@ ndim
Nj
Nk
normed
nuc
Nyquist
oneAPI
ord
orthonormal
Penrose
Polyutils
Expand Down
8 changes: 6 additions & 2 deletions doc/reference/binary.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Binary Operations
Bit-wise operations
=================

.. https://docs.scipy.org/doc/numpy/reference/routines.bitwise.html
.. https://numpy.org/doc/stable/reference/routines.bitwise.html
Element-wise bit operations
---------------------------
Expand All @@ -15,8 +15,12 @@ Element-wise bit operations
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


Bit packing
Expand Down
2 changes: 1 addition & 1 deletion doc/reference/creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Array creation routines
=======================

.. https://docs.scipy.org/doc/numpy/reference/routines.array-creation.html
.. https://numpy.org/doc/stable/reference/routines.array-creation.html
From shape or value
-----------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/reference/dtype.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Data type routines
==================

.. https://docs.scipy.org/doc/numpy/reference/routines.dtype.html
.. https://numpy.org/doc/stable/reference/routines.dtype.html
.. autosummary::
:toctree: generated/
Expand Down
40 changes: 19 additions & 21 deletions doc/reference/fft.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
.. module:: dpnp.fft

FFT Functions
=============

.. https://docs.scipy.org/doc/numpy/reference/routines.fft.html
.. https://numpy.org/doc/stable/reference/routines.fft.html
Standard FFTs
-------------
Expand All @@ -12,12 +10,12 @@ Standard FFTs
:toctree: generated/
:nosignatures:

fft
ifft
fft2
ifft2
fftn
ifftn
dpnp.fft.fft
dpnp.fft.ifft
dpnp.fft.fft2
dpnp.fft.ifft2
dpnp.fft.fftn
dpnp.fft.ifftn


Real FFTs
Expand All @@ -27,12 +25,12 @@ Real FFTs
:toctree: generated/
:nosignatures:

rfft
irfft
rfft2
irfft2
rfftn
irfftn
dpnp.fft.rfft
dpnp.fft.irfft
dpnp.fft.rfft2
dpnp.fft.irfft2
dpnp.fft.rfftn
dpnp.fft.irfftn


Hermitian FFTs
Expand All @@ -42,8 +40,8 @@ Hermitian FFTs
:toctree: generated/
:nosignatures:

hfft
ihfft
dpnp.fft.hfft
dpnp.fft.ihfft


Helper routines
Expand All @@ -53,10 +51,10 @@ Helper routines
:toctree: generated/
:nosignatures:

fftfreq
rfftfreq
fftshift
ifftshift
dpnp.fft.fftfreq
dpnp.fft.rfftfreq
dpnp.fft.fftshift
dpnp.fft.ifftshift

.. fft.config module is not implemented yet
.. dpnp.fft.config.set_cufft_callbacks
Expand Down
26 changes: 25 additions & 1 deletion doc/reference/linalg.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Linear Algebra
==============

.. https://docs.scipy.org/doc/numpy/reference/routines.linalg.html
.. https://numpy.org/doc/stable/reference/routines.linalg.html
Matrix and vector products
--------------------------
Expand All @@ -13,14 +13,19 @@ Matrix and vector products
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.tensordot
dpnp.linalg.tensordot (Array API compatible)
dpnp.einsum
dpnp.einsum_path
dpnp.linalg.matrix_power
dpnp.kron
dpnp.linalg.cross (Array API compatible)

Decompositions
--------------
Expand Down Expand Up @@ -55,11 +60,14 @@ Norms and other numbers
: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)


Solving linear equations
Expand All @@ -75,3 +83,19 @@ Solving linear equations
dpnp.linalg.inv
dpnp.linalg.pinv
dpnp.linalg.tensorinv

Other matrix operations
-----------------------
.. autosummary::
:toctree: generated/

dpnp.diagonal
dpnp.linalg.diagonal (Array API compatible)
dpnp.linalg.matrix_tranpose (Array API compatible)

Exceptions
----------
.. autosummary::
:toctree: generated/

dpnp.linalg.linAlgError
2 changes: 1 addition & 1 deletion doc/reference/logic.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Logic Functions
===============

.. https://docs.scipy.org/doc/numpy/reference/routines.logic.html
.. https://numpy.org/doc/stable/reference/routines.logic.html
Truth value testing
-------------------
Expand Down
2 changes: 1 addition & 1 deletion doc/reference/manipulation.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Array Manipulation Routines
===========================

.. https://docs.scipy.org/doc/numpy/reference/routines.array-manipulation.html
.. https://numpy.org/doc/stable/reference/routines.array-manipulation.html
Basic operations
----------------
Expand Down
2 changes: 1 addition & 1 deletion doc/reference/math.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Mathematical functions
======================

.. https://docs.scipy.org/doc/numpy/reference/routines.math.html
.. https://numpy.org/doc/stable/reference/routines.math.html
Trigonometric functions
-----------------------
Expand Down
4 changes: 1 addition & 3 deletions doc/reference/misc.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Miscellaneous routines
======================

.. https://docs.scipy.org/doc/numpy/reference/routines.other.html
.. https://numpy.org/doc/stable/reference/routines.other.html
Utility
-------
Expand All @@ -13,6 +13,4 @@ Utility
dpnp.get_include
dpnp.show_config
dpnp.show_runtime
dpnp.deprecate
dpnp.deprecate_with_doc
dpnp.broadcast_shapes
10 changes: 0 additions & 10 deletions doc/reference/pad.rst

This file was deleted.

106 changes: 52 additions & 54 deletions doc/reference/random.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
.. module:: dpnp.random

Random Sampling (``dpnp.random``)
=================================

.. https://docs.scipy.org/doc/numpy/reference/random/legacy.html
.. https://numpy.org/doc/stable/reference/random/legacy.html
Simple random data
Expand All @@ -13,16 +11,16 @@ Simple random data
:toctree: generated/
:nosignatures:

rand
randn
randint
random_integers
random_sample
random
ranf
sample
choice
bytes
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


Permutations
Expand All @@ -32,8 +30,8 @@ Permutations
:toctree: generated/
:nosignatures:

shuffle
permutation
dpnp.random.shuffle
dpnp.random.permutation


Distributions
Expand All @@ -43,41 +41,41 @@ Distributions
:toctree: generated/
:nosignatures:

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
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


Random generator
Expand All @@ -87,7 +85,7 @@ Random generator
:toctree: generated/
:nosignatures:

RandomState
seed
get_random_state
set_random_state
dpnp.random.RandomState
dpnp.random.seed
dpnp.random.get_random_state
dpnp.random.set_random_state
Loading

0 comments on commit bd6562a

Please sign in to comment.