Commit 617e50e6 authored by Stefan Behnel's avatar Stefan Behnel

move exception class into shadow function as we may not want to export it...

move exception class into shadow function as we may not want to export it under the cython.* namespace at this point
parent 3bd0ad93
......@@ -28,10 +28,6 @@ class _ArrayType(object):
return "%s[%s]" % (self.dtype, ", ".join(axes))
class InvalidTypeSpecification(Exception):
pass
def index_type(base_type, item):
"""
Support array type creation by slicing, e.g. double[:, :] specifies
......@@ -40,6 +36,9 @@ def index_type(base_type, item):
"""
assert isinstance(item, (tuple, slice))
class InvalidTypeSpecification(Exception):
pass
def verify_slice(s):
if s.start or s.stop or s.step not in (None, 1):
raise InvalidTypeSpecification(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment