mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-15 06:40:24 +01:00
further instances of np.float removed
This commit is contained in:
parent
ef35dd8684
commit
cddf6ddf6b
3 changed files with 5 additions and 5 deletions
|
@ -256,7 +256,7 @@ def odr_fit(x, y, func, silent=False, **kwargs):
|
|||
|
||||
data = RealData(x_f, y_f, sx=dx_f, sy=dy_f)
|
||||
model = Model(func)
|
||||
odr = ODR(data, model, x0, partol=np.finfo(np.float).eps)
|
||||
odr = ODR(data, model, x0, partol=np.finfo(np.float64).eps)
|
||||
odr.set_job(fit_type=0, deriv=1)
|
||||
output = odr.run()
|
||||
|
||||
|
@ -610,7 +610,7 @@ def covariance_matrix(y):
|
|||
def error_band(x, func, beta):
|
||||
"""Returns the error band for an array of sample values x, for given fit function func with optimized parameters beta."""
|
||||
cov = covariance_matrix(beta)
|
||||
if np.any(np.abs(cov - cov.T) > 1000 * np.finfo(np.float).eps):
|
||||
if np.any(np.abs(cov - cov.T) > 1000 * np.finfo(np.float64).eps):
|
||||
print('Warning, Covariance matrix is not symmetric within floating point precision')
|
||||
print('cov - cov.T:')
|
||||
print(cov - cov.T)
|
||||
|
@ -716,7 +716,7 @@ def fit_general(x, y, func, silent=False, **kwargs):
|
|||
|
||||
model = Model(func)
|
||||
|
||||
odr = ODR(data, model, beta0, partol=np.finfo(np.float).eps)
|
||||
odr = ODR(data, model, beta0, partol=np.finfo(np.float64).eps)
|
||||
odr.set_job(fit_type=fit_type, deriv=1)
|
||||
output = odr.run()
|
||||
if print_output and not silent:
|
||||
|
|
|
@ -71,7 +71,7 @@ def ks_test(obs=None):
|
|||
plt.ylabel('Cumulative probability')
|
||||
plt.title(str(bins) + ' Q values')
|
||||
|
||||
n = np.arange(1, bins + 1) / np.float(bins)
|
||||
n = np.arange(1, bins + 1) / np.float64(bins)
|
||||
Xs = np.sort(Qs)
|
||||
plt.step(Xs, n)
|
||||
diffs = n - Xs
|
||||
|
|
|
@ -297,7 +297,7 @@ class Obs:
|
|||
self.e_windowsize[e_name] = n
|
||||
break
|
||||
|
||||
if len(self.e_content[e_name]) > 1 and self.e_dvalue[e_name] > np.finfo(np.float).eps:
|
||||
if len(self.e_content[e_name]) > 1 and self.e_dvalue[e_name] > np.finfo(np.float64).eps:
|
||||
e_mean = 0
|
||||
for r_name in self.e_content[e_name]:
|
||||
e_mean += self.shape[r_name] * self.r_values[r_name]
|
||||
|
|
Loading…
Add table
Reference in a new issue