提交 f75434f3 authored 作者: Virgile Andreani's avatar Virgile Andreani 提交者: Virgile Andreani

Fix broken strings

上级 0fa80893
......@@ -1067,7 +1067,7 @@ class Function:
container = property(
lambda self: self._container,
None, # this property itself is not settable
doc=("dictionary-like access to the containers associated with " "Variables"),
doc=("dictionary-like access to the containers associated with Variables"),
)
def free(self):
......
......@@ -1328,7 +1328,7 @@ def _populate_grad_dict(var_to_app_to_idx, grad_dict, wrt, cost_name=None):
elif connected and not actually_connected:
msg = f"{node.op}.grad returned DisconnectedType for input {i}."
if hasattr(node.op, "connection_pattern"):
msg += " Its connection_pattern method does not" " allow this."
msg += " Its connection_pattern method does not allow this."
raise TypeError(msg)
else:
msg += (
......
......@@ -111,7 +111,7 @@ parser.add_option(
action="store_true",
dest="quiet",
default=False,
help="If true, do not print the comparison table and config " "options",
help="If true, do not print the comparison table and config options",
)
parser.add_option(
"--print_only",
......
......@@ -11,7 +11,7 @@ from pytensor.configdefaults import config
console_encoding = getpreferredencoding()
parser = OptionParser(
usage="%prog <options>\n Compute time for" " fast and slow elemwise operations"
usage="%prog <options>\n Compute time for fast and slow elemwise operations"
)
parser.add_option(
"-N",
......
......@@ -11,7 +11,7 @@ from pytensor.tensor.type import vector
parser = OptionParser(
usage="%prog <options>\n Compute time for" " fast and slow elemwise operations"
usage="%prog <options>\n Compute time for fast and slow elemwise operations"
)
parser.add_option(
"-N",
......
......@@ -12,7 +12,7 @@ import pytensor
__docformat__ = "restructuredtext en"
__authors__ = "Pascal Lamblin " "PyMC Developers " "PyTensor Developers "
__authors__ = "Pascal Lamblin PyMC Developers PyTensor Developers "
__copyright__ = "Copyright 2013, Universite de Montreal"
__license__ = "3-clause BSD"
......
......@@ -1563,9 +1563,7 @@ class CAReduce(COp):
elif identity is None:
raise TypeError(f"The {self.scalar_op} does not define an identity.")
task0_decl = (
f"{adtype}& {aname}_i = *{aname}_iter;\n" f"{aname}_i = {identity};"
)
task0_decl = f"{adtype}& {aname}_i = *{aname}_iter;\n{aname}_i = {identity};"
task1_decl = f"{idtype}& {inames[0]}_i = *{inames[0]}_iter;\n"
......
......@@ -316,7 +316,7 @@ class Shape_i(COp):
op=self,
x_pos=0,
x=inp[0],
comment=("No gradient for the shape of a matrix " "is implemented."),
comment="No gradient for the shape of a matrix is implemented.",
)
]
......
......@@ -328,7 +328,7 @@ def verify_grad_sparse(op, pt, structured=False, *args, **kwargs):
iconv.append(conv_none)
output = op(*[as_sparse_or_tensor_variable(p) for p in pt])
if isinstance(output, list | tuple):
raise NotImplementedError("verify_grad can't deal with " "multiple outputs")
raise NotImplementedError("verify_grad can't deal with multiple outputs")
if _is_sparse_variable(output):
oconv = DenseFromSparse(structured=structured)
else:
......
......@@ -2535,7 +2535,7 @@ class TestArithmeticCast:
# a float32 may result in a complex64. As
# of 1.9.2. this is still the case so it is
# probably by design
pytest.skip("Known issue with" "numpy see #761")
pytest.skip("Known issue with numpy see #761")
# In any other situation: something wrong is
# going on!
raise AssertionError()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论