Skip to content

Commit

Permalink
Fix namespace issues
Browse files Browse the repository at this point in the history
  • Loading branch information
philbull committed Jul 29, 2021
1 parent 094cf0f commit 4a7d314
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions examples/snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
import numpy as np

import pycola
import pycola3

# Cosmological parameters
omega_m = 0.316
Expand Down Expand Up @@ -40,7 +40,7 @@ def particle_mass(z):
print("Min. halo mass: %3.2e Msun" % halo_mmin)

# Calculate ZA initial conditions
sx, sy, sz = pycola.ic.ic_za(
sx, sy, sz = pycola3.ic.ic_za(
"camb_matterpower_z0.dat", boxsize=BOXSIZE, npart=NPART, init_seed=SEED
)
cellsize = BOXSIZE / float(sx.shape[0])
Expand All @@ -49,10 +49,10 @@ def particle_mass(z):
print("gridcellsize:", gridcellsize)

# Calculate 2LPT positions
sx2, sy2, sz2 = pycola.ic.ic_2lpt(cellsize, sx, sy, sz, boxsize=BOXSIZE)
sx2, sy2, sz2 = pycola3.ic.ic_2lpt(cellsize, sx, sy, sz, boxsize=BOXSIZE)

# Evolve particles
px, py, pz, vx, vy, vz, *_ = pycola.evolve.evolve(
px, py, pz, vx, vy, vz, *_ = pycola3.evolve.evolve(
cellsize,
sx,
sy,
Expand Down
3 changes: 2 additions & 1 deletion pycola3/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from . import acceleration, aux, box_smooth, cic, evolve, growth, ic, potential
# from . import acceleration, aux, box_smooth, cic, evolve, growth, ic, potential
from . import aux, evolve, growth, ic
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
from setuptools import Extension, find_namespace_packages, setup

sources = {
"pycola3._cic": "pycola3/src/cic.pyx",
"pycola3._potential": "pycola3/src/potential.pyx",
"pycola3._acceleration": "pycola3/src/acceleration.pyx",
"pycola3._box_smooth": "pycola3/src/box_smooth.pyx",
"pycola3.cic": "pycola3/src/cic.pyx",
"pycola3.potential": "pycola3/src/potential.pyx",
"pycola3.acceleration": "pycola3/src/acceleration.pyx",
"pycola3.box_smooth": "pycola3/src/box_smooth.pyx",
}

# Compile and link arguments for Cython modules
Expand Down Expand Up @@ -101,7 +101,7 @@

setup_args = {
"name": "pycola3",
"version": "0.0.2",
"version": "0.0.3",
"author": "Phil Bull / Svetlin V. Tassev",
"author_email": "[email protected]",
"description": "A Python/Cython N-body code, implementing the Comoving Lagrangian Acceleration (COLA) method in the temporal and spatial domains.",
Expand Down

0 comments on commit 4a7d314

Please sign in to comment.