File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -478,7 +478,7 @@ def pytensor_hash(self):
478478 return hash_from_sparse (d )
479479
480480
481- class SparseConstant (TensorConstant , _sparse_py_operators ):
481+ class SparseConstant (SparseVariable , TensorConstant ):
482482 format = property (lambda self : self .type .format )
483483
484484 def signature (self ):
Original file line number Diff line number Diff line change 33import scipy .sparse
44
55from pytensor .compile import shared_constructor
6- from pytensor .sparse .basic import SparseTensorType , _sparse_py_operators
6+ from pytensor .sparse .basic import SparseTensorType , SparseVariable
77from pytensor .tensor .sharedvar import TensorSharedVariable
88
99
10- class SparseTensorSharedVariable (TensorSharedVariable , _sparse_py_operators ):
10+ class SparseTensorSharedVariable (TensorSharedVariable , SparseVariable ):
1111 @property
1212 def format (self ):
1313 return self .type .format
Original file line number Diff line number Diff line change 66from pytensor .misc .safe_asarray import _asarray
77from pytensor .tensor import _get_vector_length
88from pytensor .tensor .type import TensorType
9- from pytensor .tensor .variable import _tensor_py_operators
9+ from pytensor .tensor .variable import TensorVariable
1010
1111
1212def load_shared_variable (val ):
@@ -19,7 +19,7 @@ def load_shared_variable(val):
1919 return tensor_constructor (val )
2020
2121
22- class TensorSharedVariable (_tensor_py_operators , SharedVariable ):
22+ class TensorSharedVariable (SharedVariable , TensorVariable ):
2323 def zero (self , borrow : bool = False ):
2424 r"""Set the values of a shared variable to 0.
2525
You can’t perform that action at this time.
0 commit comments