@@ -122,7 +122,8 @@ def wrapper(self):
122122 # Aliasing Functions must not allocate data
123123 return
124124
125- debug (f"Allocating host memory for { self .name } { self .shape_allocated } [{ humanbytes (self .nbytes )} ]" )
125+ debug (f"Allocating host memory for { self .name } { self .shape_allocated } "
126+ f"[{ humanbytes (self .nbytes )} ]" )
126127
127128 # Clear up both SymPy and Devito caches to drop unreachable data
128129 CacheManager .clear (force = False )
@@ -869,11 +870,11 @@ def _arg_check(self, args, intervals, **kwargs):
869870 data = args [self .name ]
870871
871872 if len (data .shape ) != self .ndim :
872- raise InvalidArgument (f"Shape { data .shape } of runtime value `{ self .name } ` does not match "
873- f"dimensions { self .dimensions } " )
873+ raise InvalidArgument (f"Shape { data .shape } of runtime value `{ self .name } ` "
874+ f"does not match dimensions { self .dimensions } " )
874875 if data .dtype != self .dtype :
875- warning (f"Data type { data .dtype } of runtime value `{ self .name } ` does not match the "
876- f"Function data type { self .dtype } " )
876+ warning (f"Data type { data .dtype } of runtime value `{ self .name } ` "
877+ f"does not match the Function data type { self .dtype } " )
877878
878879 # Check each Dimension for potential OOB accesses
879880 for i , s in zip (self .dimensions , data .shape ):
@@ -883,8 +884,8 @@ def _arg_check(self, args, intervals, **kwargs):
883884 args .options ['linearize' ] and \
884885 self .is_regular and \
885886 data .size - 1 >= np .iinfo (np .int32 ).max :
886- raise InvalidArgument (f"`{ self .name } `, with its { data .size } elements, is too big for "
887- "int32 pointer arithmetic. Consider using the "
887+ raise InvalidArgument (f"`{ self .name } `, with its { data .size } elements, is too "
888+ "big for int32 pointer arithmetic. Consider using the "
888889 "'index-mode=int64' option, the save=Buffer(..) "
889890 "API (TimeFunction only), or domain "
890891 "decomposition via MPI" )
@@ -1700,7 +1701,8 @@ def make(self, shape=None, initializer=None, allocator=None, **kwargs):
17001701 shape .append (int (v ))
17011702 shape = tuple (shape )
17021703 elif len (shape ) != self .ndim :
1703- raise ValueError (f"`shape` must contain { self .ndim } integers, not { len (shape )} " )
1704+ raise ValueError (f"`shape` must contain { self .ndim } integers, "
1705+ f"not { len (shape )} " )
17041706 elif not all (is_integer (i ) for i in shape ):
17051707 raise ValueError (f"`shape` must contain integers (got `{ str (shape )} `)" )
17061708
0 commit comments