From e8a7df65457531e986a65483ffe79c98c7e811a8 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sun, 21 Feb 2010 02:45:48 +0000 Subject: 3K: BUG: fix unravel_index integer division --- numpy/lib/index_tricks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'numpy/lib/index_tricks.py') diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py index 8bbdeae1e..eb1ab22e9 100644 --- a/numpy/lib/index_tricks.py +++ b/numpy/lib/index_tricks.py @@ -78,7 +78,7 @@ def unravel_index(x,dims): # [dcb,dc,d,1] dim_prod = _nx.cumprod([1] + list(dims)[:0:-1])[::-1] # Indices become [x/dcb % a, x/dc % b, x/d % c, x/1 % d] - return tuple(x/dim_prod % dims) + return tuple(x//dim_prod % dims) def ix_(*args): """ -- cgit v1.2.1