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
Gwenaël Samain
cython
Commits
c0d606ac
Commit
c0d606ac
authored
Jan 03, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make doctest output readable on error
parent
836525ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
tests/memoryview/relaxed_strides.pyx
tests/memoryview/relaxed_strides.pyx
+7
-6
No files found.
tests/memoryview/relaxed_strides.pyx
View file @
c0d606ac
# tag: numpy
# mode: run
# tag: numpy
"""
Test accepting NumPy arrays with arbitrary strides for zero- or one-sized
...
...
@@ -28,8 +28,8 @@ import numpy as np
def
test_one_sized
(
array
):
"""
>>>
a
= np.ascontiguousarray(np.arange(10, dtype=np.double)[::100])
>>> test_one_sized(
a
)[0]
>>>
contig
= np.ascontiguousarray(np.arange(10, dtype=np.double)[::100])
>>> test_one_sized(
contig
)[0]
1.0
>>> a = np.arange(10, dtype=np.double)[::100]
>>> test_one_sized(a)[0]
...
...
@@ -41,10 +41,11 @@ def test_one_sized(array):
def
test_zero_sized
(
array
):
"""
>>> a = np.ascontiguousarray(np.arange(10, dtype=np.double)[100:200:10])
>>> a = test_zero_sized(a)
>>> contig = np.ascontiguousarray(np.arange(10, dtype=np.double)[100:200:10])
>>> _ = test_zero_sized(contig)
>>> a = np.arange(10, dtype=np.double)[100:200:10]
>>>
a
= test_zero_sized(a)
>>>
_
= test_zero_sized(a)
"""
cdef
double
[::
1
]
a
=
array
return
a
\ No newline at end of file
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