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
16893be6
Commit
16893be6
authored
May 16, 2012
by
Andreas van Cranenburgh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated test to use clone function.
tests pass when compiled and run manually.
parent
450a77bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tests/run/pyarray.pyx
tests/run/pyarray.pyx
+3
-3
No files found.
tests/run/pyarray.pyx
View file @
16893be6
...
...
@@ -56,7 +56,7 @@ def test_new_zero(a):
>>> test_new_zero(a)
array('f', [0.0, 0.0, 0.0])
"""
cdef
array
.
array
cb
=
array
.
zeros_like
(
a
)
cdef
array
.
array
cb
=
array
.
clone
(
a
,
len
(
a
),
True
)
assert
cb
.
length
==
len
(
a
)
return
cb
...
...
@@ -111,8 +111,8 @@ def test_likes(a):
>>> test_likes(a)
array('f', [0.0, 0.0, 0.0])
"""
cdef
array
.
array
z
=
array
.
zeros_like
(
a
)
cdef
array
.
array
e
=
array
.
empty_like
(
a
)
cdef
array
.
array
z
=
array
.
clone
(
a
,
len
(
a
),
True
)
cdef
array
.
array
e
=
array
.
clone
(
a
,
len
(
a
),
False
)
assert
e
.
length
==
len
(
a
)
return
z
...
...
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