From 9442356797c1e5ee649fc6bb715d2a1062787af1 Mon Sep 17 00:00:00 2001 From: Michele Guerini Rocco Date: Tue, 4 Feb 2025 15:50:18 +0100 Subject: [PATCH] scripts/gray: fix read_eqdsk bug The poloidal flux matrix is written in fortran order! --- scripts/gray/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gray/__init__.py b/scripts/gray/__init__.py index 91ddaa5..8922480 100644 --- a/scripts/gray/__init__.py +++ b/scripts/gray/__init__.py @@ -58,7 +58,7 @@ def read_eqdsk(filepath: Path) -> Eqdsk: skip(file, nr * 4) # read flux and safety factor - psi = read(file, nr * nz).reshape(nr, nz) + psi = read(file, nr * nz).reshape((nr, nz), order='F').T q = read(file, nr) # normalise flux