We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8683eb1 commit 6f5ce41Copy full SHA for 6f5ce41
floatcsep/utils.py
@@ -220,9 +220,11 @@ def read_region_cfg(region_config, **kwargs):
220
except ValueError:
221
data = numpy.array([re.split(r'\s+|,', i.strip()) for i in
222
parsed_region[1:]], dtype=float)
223
- dh1 = scipy.stats.mode(np.diff(np.unique(data[:, 0]))).mode
224
- dh2 = scipy.stats.mode(np.diff(np.unique(data[:, 1]))).mode
225
- dh = np.min([dh1, dh2])
+ dh1 = scipy.stats.mode(
+ numpy.diff(numpy.unique(data[:, 0]))).mode
+ dh2 = scipy.stats.mode(
226
+ numpy.diff(numpy.unique(data[:, 1]))).mode
227
+ dh = numpy.nanmin([dh1, dh2])
228
region = CartesianGrid2D.from_origins(data,
229
name=region_data,
230
magnitudes=magnitudes,
0 commit comments