File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -187,11 +187,6 @@ def forward(self, X):
187187 if self ._selection is not None :
188188 X = X [:, self ._selection ]
189189
190- if X .dim () != 2 :
191- raise ValueError (
192- "Expected a 2D input tensor `X` with shape (L, nfeatures)."
193- )
194-
195190 preserve_2d_output = X .shape [1 ] == 1
196191 symbols = {
197192 symbol : X [:, i : i + 1 ] for i , symbol in enumerate (self .symbols_in )
Original file line number Diff line number Diff line change @@ -256,14 +256,6 @@ def test_issue_571_selection_list_keeps_2d(self):
256256 out = m (X )
257257 self .assertEqual (tuple (out .shape ), (32 , 1 ))
258258
259- def test_issue_571_reject_int_selection (self ):
260- """Issue #571: selection that collapses to 1D should raise (selection=0)."""
261- x = sympy .symbols ("x" )
262- m = sympy2torch (x + 1 , [x ], selection = 0 )
263- X = self .torch .randn (32 , 2 )
264- with self .assertRaises (ValueError ):
265- m (X )
266-
267259 def test_constant_arguments (self ):
268260 # Test that functions with constant arguments work correctly
269261 # Regression test for https://github.com/MilesCranmer/PySR/issues/656
You can’t perform that action at this time.
0 commit comments