Skip to content

Commit 459de44

Browse files
committed
Fix get_vector_length incorrectly returning for shared variable without static shape
1 parent 2a7f3e1 commit 459de44

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

pytensor/tensor/sharedvar.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import numpy as np
44

55
from pytensor.compile import SharedVariable, shared_constructor
6-
from pytensor.tensor import _get_vector_length
76
from pytensor.tensor.type import TensorType
87
from pytensor.tensor.variable import TensorVariable
98

@@ -51,11 +50,6 @@ def zero(self, borrow: bool = False):
5150
self.container.value = 0 * self.container.value
5251

5352

54-
@_get_vector_length.register(TensorSharedVariable)
55-
def _get_vector_length_TensorSharedVariable(var_inst, var):
56-
return len(var.get_value(borrow=True))
57-
58-
5953
@shared_constructor.register(np.ndarray)
6054
def tensor_constructor(
6155
value,

0 commit comments

Comments
 (0)