From 6741a3fdea8703d4afb4e8c754f70cc4faa59e42 Mon Sep 17 00:00:00 2001
From: Chichi Lalescu <chichilalescu@gmail.com>
Date: Sun, 6 May 2018 21:31:46 +0200
Subject: [PATCH] try to fix initialization for noncubic grids

---
 bfps/tools.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/bfps/tools.py b/bfps/tools.py
index 9d39e845..ee1e4775 100644
--- a/bfps/tools.py
+++ b/bfps/tools.py
@@ -203,10 +203,11 @@ def padd_with_zeros(
     """
     if (type(odtype) == type(None)):
         odtype = a.dtype
-    assert(a.shape[0] <= n0 and
-           a.shape[1] <= n1 and
+    print(a.shape, n0, n1, n2//2+1)
+    assert(a.shape[0] <= n1 and
+           a.shape[1] <= n0 and
            a.shape[2] <= n2//2+1)
-    b = np.zeros((n0, n1, n2//2 + 1) + a.shape[3:], dtype = odtype)
+    b = np.zeros((n1, n0, n2//2 + 1) + a.shape[3:], dtype = odtype)
     m0 = a.shape[1]
     m1 = a.shape[0]
     m2 = a.shape[2]
-- 
GitLab