你已经派生过 gprMax
镜像自地址
https://gitee.com/sunhf/gprMax.git
已同步 2025-08-06 04:26:52 +08:00
Changed sys.exit to gprMax GeneralError.
这个提交包含在:
@@ -13,6 +13,8 @@ import matplotlib.pyplot as plt
|
||||
|
||||
np.seterr(divide='ignore')
|
||||
|
||||
from gprMax.exceptions import GeneralError
|
||||
|
||||
"""This module contains fitness metric functions that can be used with the Taguchi optimisation method.
|
||||
|
||||
All fitness functions must take two arguments and return a single fitness value.
|
||||
@@ -326,13 +328,13 @@ def peakdet(v, delta, x = None):
|
||||
v = np.asarray(v)
|
||||
|
||||
if len(v) != len(x):
|
||||
sys.exit('Input vectors v and x must have same length')
|
||||
|
||||
raise GeneralError('Input vectors v and x must have same length')
|
||||
|
||||
if not np.isscalar(delta):
|
||||
sys.exit('Input argument delta must be a scalar')
|
||||
raise GeneralError('Input argument delta must be a scalar')
|
||||
|
||||
if delta <= 0:
|
||||
sys.exit('Input argument delta must be positive')
|
||||
raise GeneralError('Input argument delta must be positive')
|
||||
|
||||
mn, mx = np.Inf, -np.Inf
|
||||
mnpos, mxpos = np.NaN, np.NaN
|
||||
|
在新工单中引用
屏蔽一个用户