Created
July 17, 2013 01:40
-
-
Save goog/6016971 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numba import autojit | |
import numpy as np | |
@autojit | |
def sum1d(my_double_array): | |
sum = 0.0 | |
for i in range(my_double_array.shape[0]): | |
sum += my_double_array[i] | |
return sum | |
a = np.array([1.0, 2.0]) | |
print sum1d(a) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment