Commit 504b6f11 authored by Robert Bradshaw's avatar Robert Bradshaw

Revert "NumPy stopgap: fix type access before type is set and visit children"

This reverts commit 1eabb1c6.
parent 1d66ca72
...@@ -4459,9 +4459,7 @@ class AttributeNode(ExprNode): ...@@ -4459,9 +4459,7 @@ class AttributeNode(ExprNode):
# attribute. # attribute.
pass pass
# NumPy hack # NumPy hack
if (getattr(self.obj, 'type', None) and if obj_type.is_extension_type and obj_type.objstruct_cname == 'PyArrayObject':
obj_type.is_extension_type and
obj_type.objstruct_cname == 'PyArrayObject'):
from NumpySupport import numpy_transform_attribute_node from NumpySupport import numpy_transform_attribute_node
replacement_node = numpy_transform_attribute_node(self) replacement_node = numpy_transform_attribute_node(self)
# Since we can't actually replace our node yet, we only grasp its # Since we can't actually replace our node yet, we only grasp its
......
...@@ -1800,8 +1800,6 @@ class AnalyseExpressionsTransform(CythonTransform): ...@@ -1800,8 +1800,6 @@ class AnalyseExpressionsTransform(CythonTransform):
if type.is_extension_type and type.objstruct_cname == 'PyArrayObject': if type.is_extension_type and type.objstruct_cname == 'PyArrayObject':
from NumpySupport import numpy_transform_attribute_node from NumpySupport import numpy_transform_attribute_node
node = numpy_transform_attribute_node(node) node = numpy_transform_attribute_node(node)
self.visitchildren(node)
return node return node
class FindInvalidUseOfFusedTypes(CythonTransform): class FindInvalidUseOfFusedTypes(CythonTransform):
......
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