Skip to content

Instantly share code, notes, and snippets.

Index: llvmpy/include/llvm_binding/extra.h
===================================================================
--- llvmpy/include/llvm_binding/extra.h (revision 14593)
+++ llvmpy/include/llvm_binding/extra.h (revision 14594)
@@ -164,6 +164,7 @@
for(; begin != end; ++begin) {
PyObject* cap = pycapsule_new(&*begin, capsuleName, className);
PyList_Append(list, cap);
+ Py_DECREF(cap);
}
Index: athena/src/numba/numba/testing/test_support.py
===================================================================
--- athena/src/numba/numba/testing/test_support.py (revision 83646)
+++ athena/src/numba/numba/testing/test_support.py (revision 83647)
@@ -184,6 +184,7 @@
pass
TestCase.__name__ = func.__name__
+ TestCase.__module__ = func.__module__
names = named_parameters.keys()
"""
>>> empty_bool()
False
>>> convert_bool(0)
False
>>> convert_bool(1)
True
>>> convert_bool(0.0)
False
>>> convert_bool(10.0)
--- tests\core\issues\test_issue_56.py 2013-05-03 10:59:52.000000000 -0400
+++ test_issue_56.py 2013-07-26 11:12:50.819162900 -0400
@@ -23,9 +23,8 @@
test_fn = jit('f8[:](f8[:],f8[:])')(maxstar1d)
test_a = numpy.random.random(10)
test_b = numpy.random.random(10)
- self.assertTrue((test_fn(test_a, test_b) ==
- maxstar1d(test_a, test_b)).all())
-
+ self.assertTrue(numpy.allclose(test_fn(test_a, test_b),
--- tests\minivect\test_operators.py 2013-05-03 10:59:52.000000000 -0400
+++ test_operators.py 2013-07-26 10:33:30.811482800 -0400
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
-import pytest
from .llvm_testutils import *
@@ -11,26 +10,16 @@
Index: athena/src/numba/numba/testing/test_support.py
===================================================================
--- athena/src/numba/numba/testing/test_support.py (revision 83368)
+++ athena/src/numba/numba/testing/test_support.py (working copy)
@@ -1,11 +1,11 @@
# -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
+import itertools
import os
Index: athena/src/numba/numba/testing/test_support.py
===================================================================
--- athena/src/numba/numba/testing/test_support.py (revision 83292)
+++ athena/src/numba/numba/testing/test_support.py (working copy)
@@ -177,7 +177,7 @@
TestCase.__name__ = func.__name__
for i, parameter in enumerate(parameters):
- name = '%s_%d' % (func.__name__, i)
+ name = 'test_%s_%d' % (func.__name__, i)
Index: numba/transforms.py
===================================================================
--- numba/transforms.py (revision 83292)
+++ numba/transforms.py (working copy)
@@ -630,17 +635,16 @@
def visit_MathNode(self, math_node):
"Translate a nodes.MathNode to an intrinsic or libc math call"
- from numba.type_inference.modules import mathmodule
- lowerable = is_math_function([math_node.arg], math_node.py_func)
Index: athena/src/numba/numba/visitors.py
===================================================================
--- athena/src/numba/numba/visitors.py (revision 81084)
+++ athena/src/numba/numba/visitors.py (revision 83292)
@@ -27,6 +27,17 @@
def __init__(self, *args, **kwargs):
pass
+def _flatmap(func, sequence):
+ result = []
Index: numba/visitors.py
===================================================================
--- numba/visitors.py (revision 81089)
+++ numba/visitors.py (revision 81090)
@@ -364,47 +364,68 @@
function_level = 0
def __init__(self, *args, **kwargs):
- self.referenced = {}
- self.assigned = {}