From 074b03cbb1cd582b7803944cd0fb334e594afd08 Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Wed, 9 May 2018 22:48:38 -0400 Subject: [PATCH 1/2] Update catd mean to float64 To aid in merging #22, where we've collapsed the xyz dimensions into an S dimension. Tracing back on a numpy core bug with large arrays: https://github.com/numpy/numpy/issues/8869#issuecomment-369620242 --- tedana/interfaces/tedana.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tedana/interfaces/tedana.py b/tedana/interfaces/tedana.py index 0e454ab84..6960e8461 100644 --- a/tedana/interfaces/tedana.py +++ b/tedana/interfaces/tedana.py @@ -407,7 +407,7 @@ def fitmodels_direct(catd, mmix, mask, t2s, t2sG, tes, combmode, head, nx, ny, nz, _, n_components = betas.shape n_voxels = mask.sum() n_data_voxels = (t2s != 0).sum() - mu = catd.mean(axis=-1) + mu = catd.mean(axis=-1, dtype=float) tes = np.reshape(tes, (n_echoes, 1)) fmin, fmid, fmax = getfbounds(n_echoes) From dd2b223355faf191aa1b9317f53784ce00c15382 Mon Sep 17 00:00:00 2001 From: Elizabeth DuPre Date: Thu, 10 May 2018 00:41:15 -0400 Subject: [PATCH 2/2] Coerce catd to float --- tedana/interfaces/tedana.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tedana/interfaces/tedana.py b/tedana/interfaces/tedana.py index 6960e8461..cdc66ddb6 100644 --- a/tedana/interfaces/tedana.py +++ b/tedana/interfaces/tedana.py @@ -1447,6 +1447,7 @@ def main(data, tes, mixm=None, ctab=None, manacc=None, strict=False, # Reshape data catd = cat2echos(catim.get_data(), n_echoes) + catd = catd.astype(float) nx, ny, nz, _, nt = catd.shape # Parse options, prepare output directory