MilesCranmer commited on
Commit
177b7cc
1 Parent(s): 14f69cf

Remove extra newline

Browse files
Files changed (1) hide show
  1. pysr/sr.py +6 -12
pysr/sr.py CHANGED
@@ -282,33 +282,27 @@ const warmupMaxsize = {warmupMaxsize:d}
282
  op_runner += f"""
283
  @inline function BINOP(i::Int, x::Float32, y::Float32)::Float32
284
  if i == 1
285
- return @fastmath {binary_operators[0]}(x, y)
286
- """
287
  for i in range(1, len(binary_operators)):
288
  op_runner += f"""
289
  elseif i == {i+1}
290
- return @fastmath {binary_operators[i]}(x, y)
291
- """
292
  op_runner += """
293
  end
294
- end
295
- """
296
 
297
  if len(unary_operators) > 0:
298
  op_runner += f"""
299
  @inline function UNAOP(i::Int, x::Float32)::Float32
300
  if i == 1
301
- return @fastmath {unary_operators[0]}(x)
302
- """
303
  for i in range(1, len(unary_operators)):
304
  op_runner += f"""
305
  elseif i == {i+1}
306
- return @fastmath {unary_operators[i]}(x)
307
- """
308
  op_runner += """
309
  end
310
- end
311
- """
312
 
313
  def_hyperparams += op_runner
314
 
 
282
  op_runner += f"""
283
  @inline function BINOP(i::Int, x::Float32, y::Float32)::Float32
284
  if i == 1
285
+ return @fastmath {binary_operators[0]}(x, y)"""
 
286
  for i in range(1, len(binary_operators)):
287
  op_runner += f"""
288
  elseif i == {i+1}
289
+ return @fastmath {binary_operators[i]}(x, y)"""
 
290
  op_runner += """
291
  end
292
+ end"""
 
293
 
294
  if len(unary_operators) > 0:
295
  op_runner += f"""
296
  @inline function UNAOP(i::Int, x::Float32)::Float32
297
  if i == 1
298
+ return @fastmath {unary_operators[0]}(x)"""
 
299
  for i in range(1, len(unary_operators)):
300
  op_runner += f"""
301
  elseif i == {i+1}
302
+ return @fastmath {unary_operators[i]}(x)"""
 
303
  op_runner += """
304
  end
305
+ end"""
 
306
 
307
  def_hyperparams += op_runner
308