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
5537103d
Commit
5537103d
authored
Jun 08, 2016
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #512 from da-woods/locals_numpy
numpy arrays are no longer omitted from locals()
parents
5d72608b
32fec930
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+3
-0
tests/run/locals.pyx
tests/run/locals.pyx
+10
-0
No files found.
Cython/Compiler/PyrexTypes.py
View file @
5537103d
...
...
@@ -975,6 +975,9 @@ class BufferType(BaseType):
self
.
negative_indices
=
negative_indices
self
.
cast
=
cast
def
can_coerce_to_pyobject
(
self
,
env
):
return
True
def
as_argument_type
(
self
):
return
self
...
...
tests/run/locals.pyx
View file @
5537103d
...
...
@@ -103,3 +103,13 @@ def pass_on_locals(f):
f
(
locals
())
f
(
l
=
locals
())
f
(
l
=
locals
(),
a
=
1
)
def
locals_arrays
(
object
[
double
,
ndim
=
1
]
a
):
"""
>>> import numpy as np
>>> sorted(locals_arrays(np.arange(5,dtype='double')))
['a', 'b']
"""
cdef
object
[
double
,
ndim
=
1
]
b
=
a
.
copy
()
return
locals
()
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