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 @@ -479,7 +479,7 @@ def pytensor_hash(self):
479479 return hash_from_sparse (d )
480480
481481
482- class SparseConstant (TensorConstant , _sparse_py_operators ):
482+ class SparseConstant (SparseVariable , TensorConstant ):
483483 format = property (lambda self : self .type .format )
484484
485485 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 __getattr__ (name ):
@@ -31,7 +31,7 @@ def load_shared_variable(val):
3131 return tensor_constructor (val )
3232
3333
34- class TensorSharedVariable (_tensor_py_operators , SharedVariable ):
34+ class TensorSharedVariable (SharedVariable , TensorVariable ):
3535 def zero (self , borrow : bool = False ):
3636 r"""Set the values of a shared variable to 0.
3737
You can’t perform that action at this time.
0 commit comments