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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
e1982505
Commit
e1982505
authored
Jan 04, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
work around different NumPy 0.18 compile time configurations
parent
95a3efd8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
tests/memoryview/relaxed_strides.pyx
tests/memoryview/relaxed_strides.pyx
+6
-2
No files found.
tests/memoryview/relaxed_strides.pyx
View file @
e1982505
...
@@ -26,6 +26,9 @@ See also:
...
@@ -26,6 +26,9 @@ See also:
import
numpy
as
np
import
numpy
as
np
NUMPY_HAS_RELAXED_STRIDES
=
np
.
ones
((
10
,
1
),
order
=
"C"
).
flags
.
f_contiguous
def
test_one_sized
(
array
):
def
test_one_sized
(
array
):
"""
"""
...
@@ -33,7 +36,8 @@ def test_one_sized(array):
...
@@ -33,7 +36,8 @@ def test_one_sized(array):
>>> test_one_sized(contig)[0]
>>> test_one_sized(contig)[0]
1.0
1.0
>>> a = np.arange(10, dtype=np.double)[::100]
>>> a = np.arange(10, dtype=np.double)[::100]
>>> test_one_sized(a)[0]
>>> if NUMPY_HAS_RELAXED_STRIDES: print(test_one_sized(a)[0])
... else: print(1.0)
1.0
1.0
"""
"""
cdef
double
[::
1
]
a
=
array
cdef
double
[::
1
]
a
=
array
...
@@ -47,7 +51,7 @@ def test_zero_sized(array):
...
@@ -47,7 +51,7 @@ def test_zero_sized(array):
>>> _ = test_zero_sized(contig)
>>> _ = test_zero_sized(contig)
>>> a = np.arange(10, dtype=np.double)[100:200:10]
>>> a = np.arange(10, dtype=np.double)[100:200:10]
>>> _ = test_zero_sized(a)
>>>
if NUMPY_HAS_RELAXED_STRIDES:
_ = test_zero_sized(a)
"""
"""
cdef
double
[::
1
]
a
=
array
cdef
double
[::
1
]
a
=
array
return
a
return
a
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