From 15c0cba693646269c04f245ca52f405ddfdb4a07 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Mon, 28 Oct 2019 22:29:50 +0100 Subject: Set default order for custom ndindex overload --- boltzgen/geometry.py | 2 +- boltzgen/utility/ndindex.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/boltzgen/geometry.py b/boltzgen/geometry.py index d4411ad..443dee2 100644 --- a/boltzgen/geometry.py +++ b/boltzgen/geometry.py @@ -25,7 +25,7 @@ class Geometry: raise Exception('Geometry malformed') def inner_cells(self, order='F'): - for idx in ndindex(self.inner_size(), order): + for idx in ndindex(self.inner_size(), order=order): yield tuple(map(lambda i: i + 1, idx)) def size(self): diff --git a/boltzgen/utility/ndindex.py b/boltzgen/utility/ndindex.py index 0c5ed9b..263077a 100644 --- a/boltzgen/utility/ndindex.py +++ b/boltzgen/utility/ndindex.py @@ -5,7 +5,7 @@ import numpy.core.numeric as _nx class ndindex(numpy.ndindex): pass - def __init__(self, *shape, order): + def __init__(self, *shape, order='F'): if len(shape) == 1 and isinstance(shape[0], tuple): shape = shape[0] x = as_strided(_nx.zeros(1), shape=shape, -- cgit v1.2.3