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 794977f commit 1a1a8e1
Show file tree
Hide file tree
Showing 48 changed files with 48 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermadd():
def test_add_physicists_hermite_polynomial():
for j in range(5):
for k in range(5):
target = torch.zeros(max(j, k) + 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermeadd():
def test_add_probabilists_hermite_polynomial():
for j in range(5):
for k in range(5):
target = torch.zeros(max(j, k) + 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch


def test_hermder():
def test_differentiate_physicists_hermite_polynomial():
with pytest.raises(TypeError):
beignet.polynomial.differentiate_physicists_hermite_polynomial(
torch.tensor([0]), 0.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch


def test_hermeder():
def test_differentiate_probabilists_hermite_polynomial():
pytest.raises(
TypeError,
beignet.polynomial.differentiate_probabilists_hermite_polynomial,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermdiv():
def test_divide_physicists_hermite_polynomial():
for j in range(5):
for k in range(5):
input = torch.tensor([0.0] * j + [1.0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermediv():
def test_divide_probabilists_hermite_polynomial():
for j in range(5):
for k in range(5):
input = torch.tensor([0.0] * j + [1.0])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import torch


def test_hermval():
def test_evaluate_physicists_hermite_polynomial():
hermcoefficients = [
torch.tensor([1]),
torch.tensor([0, 2]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch


def test_hermval2d():
def test_evaluate_physicists_hermite_polynomial_2d():
c1d = torch.tensor([2.5, 1.0, 0.75])
c2d = torch.einsum("i,j->ij", c1d, c1d)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch


def test_hermval3d():
def test_evaluate_physicists_hermite_polynomial_3d():
c1d = torch.tensor([2.5, 1.0, 0.75])
c3d = torch.einsum("i,j,k->ijk", c1d, c1d, c1d)

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


def test_hermeval():
def test_evaluate_probabilists_hermite_polynomial():
hermecoefficients = [
torch.tensor([1]),
torch.tensor([0, 1]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch


def test_hermeval2d():
def test_evaluate_probabilists_hermite_polynomial_2d():
input = torch.rand(3, 5) * 2 - 1

a, b, c = input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch


def test_hermeval3d():
def test_evaluate_probabilists_hermite_polynomial_3d():
input = torch.rand(3, 5) * 2 - 1

a, b, c = input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermfit():
def test_fit_physicists_hermite_polynomial():
def f(x):
return x * (x - 1) * (x - 2)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermefit():
def test_fit_probabilists_hermite_polynomial():
def f(x):
return x * (x - 1) * (x - 2)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch


def test_hermint():
def test_integrate_physicists_hermite_polynomial():
with pytest.raises(TypeError):
beignet.polynomial.integrate_physicists_hermite_polynomial(
torch.tensor([0.0]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch


def test_hermeint():
def test_integrate_probabilists_hermite_polynomial():
pytest.raises(
TypeError,
beignet.polynomial.integrate_probabilists_hermite_polynomial,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermmul():
def test_multiply_physicists_hermite_polynomial():
for i in range(5):
input = torch.linspace(-3, 3, 100)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermemul():
def test_multiply_probabilists_hermite_polynomial():
for index in range(5):
input = torch.linspace(-3, 3, 100)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch


def test_hermcompanion():
def test_physicists_hermite_polynomial_companion():
with pytest.raises(ValueError):
beignet.polynomial.physicists_hermite_polynomial_companion(
torch.tensor([]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermdomain():
def test_physicists_hermite_polynomial_domain():
torch.testing.assert_close(
beignet.polynomial.physicists_hermite_polynomial_domain,
torch.tensor([-1.0, 1.0]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermfromroots():
def test_physicists_hermite_polynomial_from_roots():
torch.testing.assert_close(
beignet.polynomial.trim_physicists_hermite_polynomial_coefficients(
beignet.polynomial.physicists_hermite_polynomial_from_roots(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermone():
def test_physicists_hermite_polynomial_one():
torch.testing.assert_close(
beignet.polynomial.physicists_hermite_polynomial_one,
torch.tensor([1.0]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import torch


def test_hermpow():
def test_physicists_hermite_polynomial_power():
for i in range(5):
for j in range(5):
torch.testing.assert_close(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermroots():
def test_physicists_hermite_polynomial_roots():
torch.testing.assert_close(
beignet.polynomial.physicists_hermite_polynomial_roots(
torch.tensor([1.0]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_herm2poly():
def test_physicists_hermite_polynomial_to_polynomial():
coefficients = [
torch.tensor([1.0]),
torch.tensor([0.0, 2]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermvander():
def test_physicists_hermite_polynomial_vandermonde():
x = torch.arange(3)

output = beignet.polynomial.physicists_hermite_polynomial_vandermonde(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermvander2d():
def test_physicists_hermite_polynomial_vandermonde_2d():
a, b, c = torch.rand(3, 5) * 2 - 1

coefficients = torch.rand(2, 3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermvander3d():
def test_physicists_hermite_polynomial_vandermonde_3d():
a, b, x3 = torch.rand(3, 5) * 2 - 1

coefficients = torch.rand(2, 3, 4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermweight():
def test_physicists_hermite_polynomial_weight():
torch.testing.assert_close(
beignet.polynomial.physicists_hermite_polynomial_weight(
torch.linspace(-5, 5, 11)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermx():
def test_physicists_hermite_polynomial_x():
torch.testing.assert_close(
beignet.polynomial.physicists_hermite_polynomial_x,
torch.tensor([0, 0.5]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermzero():
def test_physicists_hermite_polynomial_zero():
torch.testing.assert_close(
beignet.polynomial.physicists_hermite_polynomial_zero,
torch.tensor([0.0]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import torch


def test_hermecompanion():
def test_probabilists_hermite_polynomial_companion():
with pytest.raises(ValueError):
beignet.polynomial.probabilists_hermite_polynomial_companion(torch.tensor([]))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermedomain():
def test_probabilists_hermite_polynomial_domain():
torch.testing.assert_close(
beignet.polynomial.probabilists_hermite_polynomial_domain,
torch.tensor([-1.0, 1.0]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import torch


def test_hermefromroots():
def test_probabilists_hermite_polynomial_from_roots():
torch.testing.assert_close(
beignet.polynomial.trim_probabilists_hermite_polynomial_coefficients(
beignet.polynomial.probabilists_hermite_polynomial_from_roots(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermeone():
def test_probabilists_hermite_polynomial_one():
torch.testing.assert_close(
beignet.polynomial.probabilists_hermite_polynomial_one,
torch.tensor([1.0]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import torch


def test_hermepow():
def test_probabilists_hermite_polynomial_power():
for j in range(5):
for k in range(5):
torch.testing.assert_close(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermeroots():
def test_probabilists_hermite_polynomial_roots():
torch.testing.assert_close(
beignet.polynomial.probabilists_hermite_polynomial_roots(
torch.tensor([1.0]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_herme2poly():
def test_probabilists_hermite_polynomial_to_polynomial():
coefficients = [
torch.tensor([1.0]),
torch.tensor([0.0, 1]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermevander():
def test_probabilists_hermite_polynomial_vandermonde():
x = torch.arange(3)
v = beignet.polynomial.probabilists_hermite_polynomial_vandermonde(
x,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermevander2d():
def test_probabilists_hermite_polynomial_vandermonde_2d():
a, b, c = torch.rand(3, 5) * 2 - 1

coefficients = torch.rand(2, 3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermevander3d():
def test_probabilists_hermite_polynomial_vandermonde_3d():
a, b, c = torch.rand(3, 5) * 2 - 1

coefficients = torch.rand(2, 3, 4)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermeweight():
def test_probabilists_hermite_polynomial_weight():
torch.testing.assert_close(
beignet.polynomial.probabilists_hermite_polynomial_weight(
torch.linspace(-5, 5, 11),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermex():
def test_probabilists_hermite_polynomial_x():
torch.testing.assert_close(
beignet.polynomial.probabilists_hermite_polynomial_x,
torch.tensor([0.0, 1.0]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import torch


def test_hermezero():
def test_probabilists_hermite_polynomial_zero():
torch.testing.assert_close(
beignet.polynomial.probabilists_hermite_polynomial_zero,
torch.tensor([0.0]),
Expand Down
Loading

0 comments on commit 1a1a8e1

Please sign in to comment.