Skip to content

Commit 6d3c756

Browse files
purna135ricardoV94
authored andcommitted
Rename module pytensor.tensor.var to pytensor.tensor.variable
1 parent 288a3f3 commit 6d3c756

37 files changed

+1140
-1111
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ repos:
1616
pytensor/graph/op\.py|
1717
pytensor/compile/nanguardmode\.py|
1818
pytensor/graph/rewriting/basic\.py|
19-
pytensor/tensor/var\.py|
19+
pytensor/tensor/variable\.py|
2020
)$
2121
- id: check-merge-conflict
2222
- repo: https://github.com/asottile/pyupgrade

pytensor/link/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
OutputStorageType,
3131
StorageMapType,
3232
)
33-
from pytensor.tensor.var import TensorVariable
33+
from pytensor.tensor.variable import TensorVariable
3434

3535

3636
ThunkAndContainersType = Tuple["BasicThunkType", List["Container"], List["Container"]]

pytensor/link/jax/dispatch/subtensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
def subtensor_assert_indices_jax_compatible(node, idx_list):
3535
from pytensor.graph.basic import Constant
36-
from pytensor.tensor.var import TensorVariable
36+
from pytensor.tensor.variable import TensorVariable
3737

3838
ilist = indices_from_subtensor(node.inputs[1:], idx_list)
3939
for idx in ilist:

pytensor/scan/op.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
from pytensor.tensor.math import minimum
8383
from pytensor.tensor.shape import Shape_i
8484
from pytensor.tensor.type import TensorType, integer_dtypes
85-
from pytensor.tensor.var import TensorVariable
85+
from pytensor.tensor.variable import TensorVariable
8686

8787

8888
# Logging function for sending warning or info

pytensor/scan/rewriting.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
get_slice_elements,
7070
set_subtensor,
7171
)
72-
from pytensor.tensor.var import TensorConstant, get_unique_constant_value
72+
from pytensor.tensor.variable import TensorConstant, get_unique_constant_value
7373

7474

7575
list_opt_slice = [

pytensor/scan/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from pytensor.graph.utils import TestValueError
2222
from pytensor.tensor.basic import AllocEmpty, cast
2323
from pytensor.tensor.subtensor import set_subtensor
24-
from pytensor.tensor.var import TensorConstant
24+
from pytensor.tensor.variable import TensorConstant
2525

2626

2727
if TYPE_CHECKING:

pytensor/sparse/basic.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@
5151
from pytensor.tensor.type import continuous_dtypes as tensor_continuous_dtypes
5252
from pytensor.tensor.type import discrete_dtypes as tensor_discrete_dtypes
5353
from pytensor.tensor.type import iscalar, ivector, scalar, tensor, vector
54-
from pytensor.tensor.var import TensorConstant, TensorVariable, _tensor_py_operators
54+
from pytensor.tensor.variable import (
55+
TensorConstant,
56+
TensorVariable,
57+
_tensor_py_operators,
58+
)
5559

5660

5761
sparse_formats = ["csc", "csr"]

pytensor/tensor/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def _get_vector_length_Constant(op: Union[Op, Variable], var: Constant) -> int:
146146
from pytensor.tensor.subtensor import * # noqa
147147
from pytensor.tensor.type import * # noqa
148148
from pytensor.tensor.type_other import * # noqa
149-
from pytensor.tensor.var import TensorConstant, TensorVariable # noqa
149+
from pytensor.tensor.variable import TensorConstant, TensorVariable # noqa
150150

151151
# Allow accessing numpy constants from pytensor.tensor
152152
from numpy import e, euler_gamma, inf, infty, nan, newaxis, pi # noqa

pytensor/tensor/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
uint_dtypes,
6363
values_eq_approx_always_true,
6464
)
65-
from pytensor.tensor.var import (
65+
from pytensor.tensor.variable import (
6666
TensorConstant,
6767
TensorVariable,
6868
get_unique_constant_value,

pytensor/tensor/conv/abstract_conv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
get_underlying_scalar_constant_value,
3030
)
3131
from pytensor.tensor.exceptions import NotScalarConstantError
32-
from pytensor.tensor.var import TensorConstant, TensorVariable
32+
from pytensor.tensor.variable import TensorConstant, TensorVariable
3333

3434

3535
_logger = logging.getLogger(__name__)

0 commit comments

Comments
 (0)