diff options
author | pierregm <pierregmcode@gmail.com> | 2010-10-11 23:02:10 +0200 |
---|---|---|
committer | pierregm <pierregmcode@gmail.com> | 2010-10-11 23:02:10 +0200 |
commit | a14dd542532d383610c1b01c5698b137dd058fea (patch) | |
tree | 036f0452ee16fe1b9b74c13e6ad9bb9155310256 /numpy/lib/index_tricks.py | |
parent | 61d945bdb5c9b2b3329e1b8468b5c7d0596dd9fc (diff) | |
parent | 11ee694744f2552d77652ed929fdc2b4ccca6843 (diff) | |
download | numpy-a14dd542532d383610c1b01c5698b137dd058fea.tar.gz |
merging refs/remotes/origin/master into HEAD
Diffstat (limited to 'numpy/lib/index_tricks.py')
-rw-r--r-- | numpy/lib/index_tricks.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py index eb1ab22e9..264ebaad0 100644 --- a/numpy/lib/index_tricks.py +++ b/numpy/lib/index_tricks.py @@ -700,24 +700,15 @@ class IndexExpression(object): array([2, 4]) """ - maxint = sys.maxint def __init__(self, maketuple): self.maketuple = maketuple def __getitem__(self, item): - if self.maketuple and type(item) != type(()): + if self.maketuple and type(item) != tuple: return (item,) else: return item - def __len__(self): - return self.maxint - - def __getslice__(self, start, stop): - if stop == self.maxint: - stop = None - return self[start:stop:None] - index_exp = IndexExpression(maketuple=True) s_ = IndexExpression(maketuple=False) |