Commit 5537103d authored by Robert Bradshaw's avatar Robert Bradshaw

Merge pull request #512 from da-woods/locals_numpy

numpy arrays are no longer omitted from locals()
parents 5d72608b 32fec930
......@@ -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
......@@ -103,3 +103,13 @@ def pass_on_locals(f):
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()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment