Made python really optional

This commit is contained in:
Guilhem Lavaux 2016-04-26 13:10:24 +02:00
parent 984aa5e209
commit 9131e815c7
3 changed files with 12 additions and 9 deletions

View file

@ -854,16 +854,16 @@ def spherical_projection(int Nside,
N0 = outm.size
if booster < 0:
booster = 1000
booster = 1#000
job_done = view.array(shape=(N,), format="i", itemsize=sizeof(int))
job_done[:] = 0
theta,phi = hp.pix2ang(Nside, np.arange(N0))
with nogil, parallel():
if True:#nogil, parallel():
tid = smp_get_thread_id()
for i in prange(N0,schedule='dynamic',chunksize=256):
for i in range(N0):#prange(N0,schedule='dynamic',chunksize=256):
if progress != 0 and (i%booster) == 0:
with gil:
# with gil:
p.update(_mysum(job_done))
outm[i] = _spherical_projloop(theta[i], phi[i], density_view, min_distance, max_distance, shifter, integrator_id)
job_done[tid] += 1