Skip to content

Commit

Permalink
switch to 64 bit integers
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesBuchner committed Oct 25, 2024
1 parent 49401c3 commit 1d1df26
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion ultranest/integrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

__all__ = ['ReactiveNestedSampler', 'NestedSampler', 'read_file', 'warmstart_from_similar_file']

int_t = np.int32
int_t = np.int64


def _get_cumsum_range(pi, dp):
Expand Down
4 changes: 2 additions & 2 deletions ultranest/mlfriends.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ cimport cython
from cython.cimports.libc.math import sqrt


ctypedef np.int32_t decl_int_t
int_dtype = np.int32
ctypedef np.int64_t decl_int_t
int_dtype = np.int64


@cython.boundscheck(False)
Expand Down
6 changes: 2 additions & 4 deletions ultranest/popstepsampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@
generate_mixture_random_direction,
generate_random_direction,
generate_region_oriented_direction,
generate_region_random_direction, step_back,
update_vectorised_slice_sampler)
generate_region_random_direction, int_dtype,
step_back, update_vectorised_slice_sampler)
from ultranest.utils import submasks

int_dtype = np.int32


def unitcube_line_intersection(ray_origin, ray_direction):
r"""Compute intersection of a line (ray) and a unit box (0:1 in all axes).
Expand Down
4 changes: 2 additions & 2 deletions ultranest/stepfuncs.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ cimport cython
from cython.parallel import prange


ctypedef np.int32_t decl_int_t
int_dtype = np.int32
ctypedef np.int64_t decl_int_t
int_dtype = np.int64


@cython.boundscheck(False)
Expand Down

0 comments on commit 1d1df26

Please sign in to comment.