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
Boxiang Sun
cython
Commits
178b8e30
Commit
178b8e30
authored
Sep 15, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid memory leak in NumPy test.
parent
f3b71348
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
tests/run/numpy_test.pyx
tests/run/numpy_test.pyx
+5
-4
No files found.
tests/run/numpy_test.pyx
View file @
178b8e30
...
...
@@ -7,7 +7,6 @@ cimport cython
import
re
import
sys
from
libc.stdlib
cimport
malloc
def
little_endian
():
cdef
int
endian_detector
=
1
...
...
@@ -657,9 +656,11 @@ cdef fused fused_ndarray:
np
.
ndarray
[
Foo
,
ndim
=
1
]
def
get_Foo_array
():
cdef
Foo
[:]
result
=
<
Foo
[:
10
]
>
malloc
(
sizeof
(
Foo
)
*
10
)
result
[
5
].
b
=
9.0
return
np
.
asarray
(
result
)
cdef
Foo
data
[
10
]
for
i
in
range
(
10
):
data
[
i
]
=
[
0
,
0
]
data
[
5
].
b
=
9.0
return
np
.
asarray
(
<
Foo
[:]
>
data
).
copy
()
@
testcase_have_buffer_interface
def
test_fused_ndarray
(
fused_ndarray
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