Fixes to compile on OSX
This commit is contained in:
parent
170e7b7020
commit
bf0874bbd3
3 changed files with 21 additions and 4 deletions
|
@ -9,6 +9,9 @@ cimport cython
|
|||
|
||||
np.import_array()
|
||||
|
||||
cdef extern from "sys/types.h":
|
||||
ctypedef np.int64_t int64_t
|
||||
|
||||
cdef extern from "loadSimu.hpp" namespace "CosmoTool":
|
||||
|
||||
cdef cppclass SimuData:
|
||||
|
@ -20,7 +23,7 @@ cdef extern from "loadSimu.hpp" namespace "CosmoTool":
|
|||
np.float_t Omega_Lambda
|
||||
np.int64_t TotalNumPart
|
||||
np.int64_t NumPart
|
||||
np.int64_t *Id
|
||||
int64_t *Id
|
||||
float *Pos[3]
|
||||
float *Vel[3]
|
||||
int *type
|
||||
|
@ -323,7 +326,7 @@ cdef object wrap_array(void *p, np.uint64_t s, int typ):
|
|||
cdef object wrap_float_array(float *p, np.uint64_t s):
|
||||
return wrap_array(<void *>p, s, np.NPY_FLOAT32)
|
||||
|
||||
cdef object wrap_int64_array(np.int64_t* p, np.uint64_t s):
|
||||
cdef object wrap_int64_array(int64_t* p, np.uint64_t s):
|
||||
return wrap_array(<void *>p, s, np.NPY_INT64)
|
||||
|
||||
cdef object wrap_int_array(int* p, np.uint64_t s):
|
||||
|
@ -501,7 +504,7 @@ def writeGadget(str filename, object simulation):
|
|||
simdata.Vel[j] = <float *>vel.data
|
||||
|
||||
ids = simulation.getIdentifiers()
|
||||
simdata.Id = <np.int64_t *>ids.data
|
||||
simdata.Id = <int64_t *>ids.data
|
||||
simdata.BoxSize = simulation.getBoxsize()
|
||||
simdata.time = simulation.getTime()
|
||||
simdata.Hubble = simulation.getHubble()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue