Bump version and add missing file
This commit is contained in:
parent
e179544422
commit
1ea268f654
38
python/_cosmomath.pyx
Normal file
38
python/_cosmomath.pyx
Normal file
@ -0,0 +1,38 @@
|
||||
import numpy as np
|
||||
cimport numpy as np
|
||||
|
||||
np.import_array()
|
||||
np.import_ufunc()
|
||||
|
||||
cdef extern from "sys/types.h":
|
||||
ctypedef np.int64_t int64_t
|
||||
|
||||
cdef extern from "special_math.hpp" namespace "CosmoTool":
|
||||
T log_modified_bessel_first_kind[T](T v, T z) nogil except +
|
||||
|
||||
|
||||
cdef np.PyUFuncGenericFunction loop_func[1]
|
||||
cdef char input_output_types[3]
|
||||
cdef void *elementwise_funcs[1]
|
||||
|
||||
loop_func[0] = np.PyUFunc_dd_d
|
||||
|
||||
input_output_types[0] = np.NPY_DOUBLE
|
||||
input_output_types[1] = np.NPY_DOUBLE
|
||||
input_output_types[2] = np.NPY_DOUBLE
|
||||
|
||||
elementwise_funcs[0] = <void*>log_modified_bessel_first_kind[double]
|
||||
|
||||
log_modified_I = np.PyUFunc_FromFuncAndData(
|
||||
loop_func,
|
||||
elementwise_funcs,
|
||||
input_output_types,
|
||||
1, # number of supported input types
|
||||
2, # number of input args
|
||||
1, # number of output args
|
||||
0, # `identity` element, never mind this
|
||||
"log_modified_bessel_first_kind", # function name
|
||||
"log_modified_bessel_first_kind(v: Float, z: Float) -> Float", # docstring
|
||||
0 # unused
|
||||
)
|
||||
|
2
setup.py
2
setup.py
@ -218,7 +218,7 @@ class BuildCMakeExt(build_ext):
|
||||
CosmoTool_extension = CMakeExtension(name="cosmotool")
|
||||
|
||||
setup(name='cosmotool',
|
||||
version='1.0.0a8',
|
||||
version='1.1.0',
|
||||
packages=["cosmotool"],
|
||||
package_dir={'cosmotool': 'python/cosmotool'},
|
||||
install_requires=['numpy','cffi','numexpr','pyfftw','h5py'],
|
||||
|
Loading…
Reference in New Issue
Block a user