Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0x00b1 committed Jul 2, 2024
1 parent b90e2ef commit c58d3f6
Show file tree
Hide file tree
Showing 14 changed files with 12 additions and 32 deletions.
1 change: 0 additions & 1 deletion src/beignet/polynomial/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from .__fit import _fit
from .__normed_hermite_e_n import _normed_hermite_e_n
from .__normed_hermite_n import _normed_hermite_n
from .__nth_slice import _nth_slice
from ._add_chebyshev_polynomial import add_chebyshev_polynomial
from ._add_laguerre_polynomial import add_laguerre_polynomial
from ._add_legendre_polynomial import add_legendre_polynomial
Expand Down
7 changes: 0 additions & 7 deletions src/beignet/polynomial/__nth_slice.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import torch
from torch import Tensor

from . import _nth_slice
from ._chebyshev_polynomial_vandermonde import chebyshev_polynomial_vandermonde


Expand Down Expand Up @@ -36,7 +35,7 @@ def chebyshev_polynomial_vandermonde_2d(

matrices = [
*matrices,
matrix[(..., *_nth_slice(i, n))],
matrix[(..., *tuple(slice(None) if j == i else None for j in range(n)))],
]

vandermonde = functools.reduce(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import torch
from torch import Tensor

from . import _nth_slice
from ._chebyshev_polynomial_vandermonde import chebyshev_polynomial_vandermonde


Expand Down Expand Up @@ -38,7 +37,7 @@ def chebyshev_polynomial_vandermonde_3d(

matrices = [
*matrices,
matrix[(..., *_nth_slice(i, n))],
matrix[(..., *tuple(slice(None) if j == i else None for j in range(n)))],
]

vandermonde = functools.reduce(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import torch
from torch import Tensor

from . import _nth_slice
from ._laguerre_polynomial_vandermonde import laguerre_polynomial_vandermonde


Expand Down Expand Up @@ -36,7 +35,7 @@ def laguerre_polynomial_vandermonde_2d(

matrices = [
*matrices,
matrix[(..., *_nth_slice(i, n))],
matrix[(..., *tuple(slice(None) if j == i else None for j in range(n)))],
]

vandermonde = functools.reduce(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import torch
from torch import Tensor

from . import _nth_slice
from ._laguerre_polynomial_vandermonde import laguerre_polynomial_vandermonde


Expand Down Expand Up @@ -38,7 +37,7 @@ def laguerre_polynomial_vandermonde_3d(

matrices = [
*matrices,
matrix[(..., *_nth_slice(i, n))],
matrix[(..., *tuple(slice(None) if j == i else None for j in range(n)))],
]

vandermonde = functools.reduce(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import torch
from torch import Tensor

from . import _nth_slice
from ._legendre_polynomial_vandermonde import legendre_polynomial_vandermonde


Expand Down Expand Up @@ -36,7 +35,7 @@ def legendre_polynomial_vandermonde_2d(

matrices = [
*matrices,
matrix[(..., *_nth_slice(i, n))],
matrix[(..., *tuple(slice(None) if j == i else None for j in range(n)))],
]

vandermonde = functools.reduce(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import torch
from torch import Tensor

from . import _nth_slice
from ._legendre_polynomial_vandermonde import legendre_polynomial_vandermonde


Expand Down Expand Up @@ -38,7 +37,7 @@ def legendre_polynomial_vandermonde_3d(

matrices = [
*matrices,
matrix[(..., *_nth_slice(i, n))],
matrix[(..., *tuple(slice(None) if j == i else None for j in range(n)))],
]

vandermonde = functools.reduce(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import torch
from torch import Tensor

from . import _nth_slice
from ._physicists_hermite_polynomial_vandermonde import (
physicists_hermite_polynomial_vandermonde,
)
Expand Down Expand Up @@ -38,7 +37,7 @@ def physicists_hermite_polynomial_vandermonde_2d(

matrices = [
*matrices,
matrix[(..., *_nth_slice(i, n))],
matrix[(..., *tuple(slice(None) if j == i else None for j in range(n)))],
]

vandermonde = functools.reduce(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import torch
from torch import Tensor

from . import _nth_slice
from ._physicists_hermite_polynomial_vandermonde import (
physicists_hermite_polynomial_vandermonde,
)
Expand Down Expand Up @@ -40,7 +39,7 @@ def physicists_hermite_polynomial_vandermonde_3d(

matrices = [
*matrices,
matrix[(..., *_nth_slice(i, n))],
matrix[(..., *tuple(slice(None) if j == i else None for j in range(n)))],
]

vandermonde = functools.reduce(
Expand Down
3 changes: 1 addition & 2 deletions src/beignet/polynomial/_polynomial_vandermonde_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import torch
from torch import Tensor

from . import _nth_slice
from ._polynomial_vandermonde import polynomial_vandermonde


Expand Down Expand Up @@ -45,7 +44,7 @@ def polynomial_vandermonde_2d(x: Tensor, y: Tensor, degree: Tensor) -> Tensor:

matrices = [
*matrices,
matrix[(..., *_nth_slice(i, n))],
matrix[(..., *tuple(slice(None) if j == i else None for j in range(n)))],
]

vandermonde = functools.reduce(
Expand Down
3 changes: 1 addition & 2 deletions src/beignet/polynomial/_polynomial_vandermonde_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import torch
from torch import Tensor

from . import _nth_slice
from ._polynomial_vandermonde import polynomial_vandermonde


Expand Down Expand Up @@ -50,7 +49,7 @@ def polynomial_vandermonde_3d(

matrices = [
*matrices,
matrix[(..., *_nth_slice(i, n))],
matrix[(..., *tuple(slice(None) if j == i else None for j in range(n)))],
]

vandermonde = functools.reduce(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import torch
from torch import Tensor

from . import _nth_slice
from ._probabilists_hermite_polynomial_vandermonde import (
probabilists_hermite_polynomial_vandermonde,
)
Expand Down Expand Up @@ -38,7 +37,7 @@ def probabilists_hermite_polynomial_vandermonde_2d(

matrices = [
*matrices,
matrix[(..., *_nth_slice(i, n))],
matrix[(..., *tuple(slice(None) if j == i else None for j in range(n)))],
]

vandermonde = functools.reduce(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import torch
from torch import Tensor

from . import _nth_slice
from ._probabilists_hermite_polynomial_vandermonde import (
probabilists_hermite_polynomial_vandermonde,
)
Expand Down Expand Up @@ -40,7 +39,7 @@ def probabilists_hermite_polynomial_vandermonde_3d(

matrices = [
*matrices,
matrix[(..., *_nth_slice(i, n))],
matrix[(..., *tuple(slice(None) if j == i else None for j in range(n)))],
]

vandermonde = functools.reduce(
Expand Down

0 comments on commit c58d3f6

Please sign in to comment.