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
def binned_elements_finder(x, bin_limits): | |
""" Given an array x, and a set of bin limits on x, | |
return an indexer and a set of slices for retrieiving the set of points | |
in x that lie in the i^th bin. | |
Parameters | |
---------- | |
x : array | |
bin_limits : array |
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
import numpy as np | |
from astropy.table import Table | |
############################################ | |
# First we create some fake data | |
# We'll make a galaxy group catalog | |
# using a million galaxies so that the calculation | |
# would be very expensive to do naively | |
Ngals = 1e6 | |
Ngroups = 3e5 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 cython.parallel import prange | |
def c_array_f_multi(double[:] X): | |
cdef int N = X.shape[0] | |
cdef double[:] Y = np.zeros(N) | |
cdef int i | |
for i in prange(N, nogil=True): | |
if X[i] > 0.5: |
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
Show hidden characters
{ | |
"user": { | |
"@python": 2, | |
"debug": false, | |
"delay": 0.25, | |
"error_color": "D02000", | |
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Default/Default.gutter-theme", | |
"gutter_theme_excludes": [], | |
"lint_mode": "background", | |
"linters": { |
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
// SublimeLinter Settings - User | |
{ | |
"paths": { | |
"linux": [], | |
"osx": [ | |
"/Users/aphearin/anaconda/bin/" | |
], | |
"windows": [] | |
}, |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer