Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
3bd0ad93
Commit
3bd0ad93
authored
Jan 19, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove references to 'minierror' module from Shadow.py
parent
2e884463
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
Cython/Shadow.py
Cython/Shadow.py
+10
-3
No files found.
Cython/Shadow.py
View file @
3bd0ad93
# cython.* namespace for pure mode.
__version__
=
"0.18b1"
# Shamelessly copied from Cython/minivect/minitypes.py
# BEGIN shameless copy from Cython/minivect/minitypes.py
class
_ArrayType
(
object
):
...
...
@@ -26,6 +27,11 @@ 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
...
...
@@ -36,7 +42,7 @@ def index_type(base_type, item):
def
verify_slice
(
s
):
if
s
.
start
or
s
.
stop
or
s
.
step
not
in
(
None
,
1
):
raise
minierror
.
InvalidTypeSpecification
(
raise
InvalidTypeSpecification
(
"Only a step of 1 may be provided to indicate C or "
"Fortran contiguity"
)
...
...
@@ -45,7 +51,7 @@ def index_type(base_type, item):
for
idx
,
s
in
enumerate
(
item
):
verify_slice
(
s
)
if
s
.
step
and
(
step_idx
or
idx
not
in
(
0
,
len
(
item
)
-
1
)):
raise
minierror
.
InvalidTypeSpecification
(
raise
InvalidTypeSpecification
(
"Step may only be provided once, and only in the "
"first or last dimension."
)
...
...
@@ -61,6 +67,7 @@ def index_type(base_type, item):
# END shameless copy
compiled
=
False
_Unspecified
=
object
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment