diff options
author | Travis Oliphant <oliphant@enthought.com> | 2007-03-29 18:23:11 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2007-03-29 18:23:11 +0000 |
commit | cc21968aa91cef9a7517092c07684192c73a830b (patch) | |
tree | b6fdb8a30523e84dc663d62491cccdc0c29d2fd7 /numpy/lib/index_tricks.py | |
parent | 2b3080362d7afdd49c3ad5f2e1e89d572fd2a357 (diff) | |
download | numpy-cc21968aa91cef9a7517092c07684192c73a830b.tar.gz |
Fix mgrid inconsistency ticket #467
Diffstat (limited to 'numpy/lib/index_tricks.py')
-rw-r--r-- | numpy/lib/index_tricks.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py index a59ce34b4..8e6f36e30 100644 --- a/numpy/lib/index_tricks.py +++ b/numpy/lib/index_tricks.py @@ -10,6 +10,7 @@ __all__ = ['unravel_index', import sys import numpy.core.numeric as _nx from numpy.core.numeric import asarray, ScalarType, array +import math import function_base import numpy.core.defmatrix as matrix @@ -141,7 +142,7 @@ class nd_grid(object): size.append(int(abs(step))) typ = float else: - size.append(int((key[k].stop - start)/(step*1.0))) + size.append(math.ceil((key[k].stop - start)/(step*1.0))) if isinstance(step, float) or \ isinstance(start, float) or \ isinstance(key[k].stop, float): |