Commit 9597e686 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

cosmetics

parent 13f0318c
...@@ -102,11 +102,13 @@ class LogRGSpace(StructuredDomain): ...@@ -102,11 +102,13 @@ class LogRGSpace(StructuredDomain):
dist = self.bindistances dist = self.bindistances
for i in range(ndim): for i in range(ndim):
ks = np.zeros(self.shape[i]) ks = np.zeros(self.shape[i])
ks[1:] = np.minimum(self.shape[i] - 1 - np.arange(self.shape[i]-1), np.arange(self.shape[i]-1)) * dist[i] ks[1:] = np.minimum(self.shape[i] - 1 - np.arange(self.shape[i]-1),
np.arange(self.shape[i]-1)) * dist[i]
if self.harmonic: if self.harmonic:
ks[0] = np.nan ks[0] = np.nan
else: else:
ks[0] = -np.inf ks[0] = -np.inf
ks[1:] += self.t_0[i] ks[1:] += self.t_0[i]
k_array[i] += ks.reshape((1,)*i + (self.shape[i],) + (1,)*(ndim-i-1)) k_array[i] += ks.reshape((1,)*i + (self.shape[i],)
+ (1,)*(ndim-i-1))
return k_array return k_array
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment