Commit 2e8e56c8 authored by Robert Bradshaw's avatar Robert Bradshaw

Revert "Don't assume a NameNode attribute base in NumpySupport"

This reverts commit 29d68530.
parent ff7a7984
......@@ -26,7 +26,7 @@ def numpy_transform_attribute_node(node):
return node
pos = node.pos
numpy_pxd_scope = node.obj.type.scope.parent_scope
numpy_pxd_scope = node.obj.entry.type.scope.parent_scope
def macro_call_node(numpy_macro_name):
array_node = node.obj
......
......@@ -4,7 +4,6 @@
import numpy as np
cimport numpy as np
int64_array = np.ones((3, 2), dtype=np.int64)
def f():
"""
......@@ -15,7 +14,7 @@ def f():
shape[1] 2
strides 16 8
"""
cdef np.ndarray x = int64_array
cdef np.ndarray x = np.ones((3, 2), dtype=np.int64)
cdef int i
cdef Py_ssize_t j, k
cdef char *p
......@@ -44,11 +43,3 @@ def f():
k = x.strides[1]
print 'strides', j, k
def test_non_namenode_attribute_access(obj):
"""
>>> test_non_namenode_attribute_access(int64_array)
data 1
"""
# Try casting, resulting in an AttributeNode with a TypeCastNode as object
# and 'data' as attribute
print "data", (<np.int64_t *> (<np.ndarray> obj).data)[0]
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