MilesCranmer commited on
Commit
4d7fdcd
·
1 Parent(s): 03f8fff

Correct number of features in test

Browse files
Files changed (1) hide show
  1. test/test_torch.py +1 -1
test/test_torch.py CHANGED
@@ -6,7 +6,7 @@ import sympy
6
  print("Test Torch 1 - test export")
7
  x, y, z = sympy.symbols('x y z')
8
  cosx = 1.0 * sympy.cos(x) + y
9
- X = torch.randn((1000, 2))
10
  true = 1.0 * torch.cos(X[:, 0]) + X[:, 1]
11
  torch_module = sympy2torch(cosx, [x, y, z])
12
  assert np.all(np.isclose(torch_module(X).detach().numpy(), true.detach().numpy()))
 
6
  print("Test Torch 1 - test export")
7
  x, y, z = sympy.symbols('x y z')
8
  cosx = 1.0 * sympy.cos(x) + y
9
+ X = torch.randn((1000, 3))
10
  true = 1.0 * torch.cos(X[:, 0]) + X[:, 1]
11
  torch_module = sympy2torch(cosx, [x, y, z])
12
  assert np.all(np.isclose(torch_module(X).detach().numpy(), true.detach().numpy()))