@@ -1185,15 +1185,15 @@ def set_data(
1185
1185
f"Resizing dimension '{ dname } ' is impossible, because "
1186
1186
f"a 'TensorConstant' stores its length. To be able "
1187
1187
f"to change the dimension length, 'fixed' in "
1188
- f"'model.add_coord' must be passed False."
1188
+ f"'model.add_coord' must be set to ` False` ."
1189
1189
)
1190
1190
if length_tensor .owner is None :
1191
1191
# This is the case if the dimension was initialized
1192
1192
# from custom coords, but dimension length was not
1193
1193
# stored in TensorConstant e.g by 'fixed' set to False
1194
1194
1195
1195
warnings .warn (
1196
- f"You're changing the shape of a shared variable "
1196
+ f"You're changing the shape of a variable "
1197
1197
f"in the '{ dname } ' dimension which was initialized "
1198
1198
f"from coords. Make sure to update the corresponding "
1199
1199
f"coords, otherwise you'll get shape issues." ,
@@ -1206,14 +1206,14 @@ def set_data(
1206
1206
f"Resizing dimension '{ dname } ' with values of length { new_length } would lead to incompatibilities, "
1207
1207
f"because the dimension was initialized from '{ length_belongs_to } ' which is not a shared variable. "
1208
1208
f"Check if the dimension was defined implicitly before the shared variable '{ name } ' was created, "
1209
- f"for example by a model variable." ,
1209
+ f"for example by another model variable." ,
1210
1210
actual = new_length ,
1211
1211
expected = old_length ,
1212
1212
)
1213
1213
if original_coords is not None :
1214
1214
if new_coords is None :
1215
1215
raise ValueError (
1216
- f"The '{ name } ' variable already had { len (original_coords )} coord values defined for"
1216
+ f"The '{ name } ' variable already had { len (original_coords )} coord values defined for "
1217
1217
f"its { dname } dimension. With the new values this dimension changes to length "
1218
1218
f"{ new_length } , so new coord values for the { dname } dimension are required."
1219
1219
)
0 commit comments