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
56f03d35
Commit
56f03d35
authored
Feb 17, 2018
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix doctest issue due to different array display in NumPy 1.14.
parent
784722da
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
tests/run/numpy_test.pyx
tests/run/numpy_test.pyx
+10
-11
No files found.
tests/run/numpy_test.pyx
View file @
56f03d35
...
...
@@ -43,14 +43,14 @@ try:
2 0 9 5
>>> three_dim() # doctest: +NORMALIZE_WHITESPACE
[[[
0. 1. 2. 3.]
[
4. 5. 6. 7.]]
<
_BLANKLINE_
>
[[
8. 9. 10. 11.]
[
12. 13. 14. 15.]]
<
_BLANKLINE_
>
[[
16. 17. 18. 19.]
[
20. 21. 22. 23.]]]
[[[0. 1. 2. 3.]
[4. 5. 6. 7.]]
<
BLANKLINE
>
[[8. 9. 10. 11.]
[12. 13. 14. 15.]]
<
BLANKLINE
>
[[16. 17. 18. 19.]
[20. 21. 22. 23.]]]
6.0 0.0 13.0 8.0
>>> obj_array()
...
...
@@ -286,10 +286,9 @@ def assert_dtype_sizes():
def
ndarray_str
(
arr
):
u"""
Since Py2.3 doctest don't support <BLANKLINE>, manually replace blank lines
with <_BLANKLINE_>
Work around display differences in NumPy 1.14.
"""
return
unicode
(
arr
).
replace
(
u'
\
n
\
n
'
,
u'
\
n
<_BLANKLINE_>
\
n
'
)
return
re
.
sub
(
ur'\
[ +
', '
[
', unicode(arr)
)
def basic():
cdef object[int, ndim=2] buf = np.arange(10, dtype='
i
').reshape((2, 5))
...
...
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