Allow internal version of dependencies

This commit is contained in:
Guilhem Lavaux 2015-01-19 17:00:16 +01:00
parent 7a27dae025
commit 9c9aa6c2e3
3 changed files with 232 additions and 42 deletions

View file

@ -4,10 +4,10 @@ import cosmolopy as cpy
from cosmogrowth import *
import borgadaptor as ba
def gen_posgrid(N, L):
def gen_posgrid(N, L, delta=1, dtype=np.float32):
""" Generate an ordered lagrangian grid"""
ix = (np.arange(N)*L/N).astype(np.float32)
ix = (np.arange(N)*L/N*delta).astype(dtype)
x = ix[:,None,None].repeat(N, axis=1).repeat(N, axis=2)
y = ix[None,:,None].repeat(N, axis=0).repeat(N, axis=2)