Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Enhancements
Bug fixes
---------
- Fix Python reference leak to results struct [#229]
- Fix parsing error when ``periodic=False`` and ``boxsize`` not given in the theory module [#257]


2.3.4 (2019-07-21)
Expand Down
4 changes: 2 additions & 2 deletions Corrfunc/theory/DD.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ def DD(autocorr, nthreads, binfile, X1, Y1, Z1, weights1=None, periodic=True,

# Passing None parameters breaks the parsing code, so avoid this
kwargs = {}
for k in ['weights1', 'weights2', 'weight_type', 'X2', 'Y2', 'Z2']:
for k in ['weights1', 'weights2', 'weight_type',
'X2', 'Y2', 'Z2', 'boxsize']:
v = locals()[k]
if v is not None:
kwargs[k] = v
Expand All @@ -241,7 +242,6 @@ def DD(autocorr, nthreads, binfile, X1, Y1, Z1, weights1=None, periodic=True,
X1, Y1, Z1,
periodic=periodic,
verbose=verbose,
boxsize=boxsize,
output_ravg=output_ravg,
xbin_refine_factor=xbin_refine_factor,
ybin_refine_factor=ybin_refine_factor,
Expand Down
4 changes: 2 additions & 2 deletions Corrfunc/theory/DDrppi.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ def DDrppi(autocorr, nthreads, pimax, binfile, X1, Y1, Z1, weights1=None,

# Passing None parameters breaks the parsing code, so avoid this
kwargs = {}
for k in ['weights1', 'weights2', 'weight_type', 'X2', 'Y2', 'Z2']:
for k in ['weights1', 'weights2', 'weight_type',
'X2', 'Y2', 'Z2', 'boxsize']:
v = locals()[k]
if v is not None:
kwargs[k] = v
Expand All @@ -293,7 +294,6 @@ def DDrppi(autocorr, nthreads, pimax, binfile, X1, Y1, Z1, weights1=None,
X1, Y1, Z1,
periodic=periodic,
verbose=verbose,
boxsize=boxsize,
output_rpavg=output_rpavg,
xbin_refine_factor=xbin_refine_factor,
ybin_refine_factor=ybin_refine_factor,
Expand Down
4 changes: 2 additions & 2 deletions Corrfunc/theory/DDsmu.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,8 @@ def DDsmu(autocorr, nthreads, binfile, mu_max, nmu_bins,

# Passing None parameters breaks the parsing code, so avoid this
kwargs = {}
for k in ['weights1', 'weights2', 'weight_type', 'X2', 'Y2', 'Z2']:
for k in ['weights1', 'weights2', 'weight_type',
'X2', 'Y2', 'Z2', 'boxsize']:
v = locals()[k]
if v is not None:
kwargs[k] = v
Expand All @@ -309,7 +310,6 @@ def DDsmu(autocorr, nthreads, binfile, mu_max, nmu_bins,
X1, Y1, Z1,
periodic=periodic,
verbose=verbose,
boxsize=boxsize,
output_savg=output_savg,
fast_divide_and_NR_steps=fast_divide_and_NR_steps,
xbin_refine_factor=xbin_refine_factor,
Expand Down
8 changes: 6 additions & 2 deletions Corrfunc/theory/vpf.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ def vpf(rmax, nbins, nspheres, numpN, seed,
if periodic and boxsize is None:
raise ValueError("Must specify a boxsize if periodic=True")

kwargs = {}
if boxsize is not None:
kwargs['boxsize'] = boxsize

# Ensure all input arrays are native endian
X, Y, Z = [convert_to_native_endian(arr, warn=True)
for arr in [X, Y, Z]]
Expand All @@ -216,14 +220,14 @@ def vpf(rmax, nbins, nspheres, numpN, seed,
X, Y, Z,
verbose=verbose,
periodic=periodic,
boxsize=boxsize,
xbin_refine_factor=xbin_refine_factor,
ybin_refine_factor=ybin_refine_factor,
zbin_refine_factor=zbin_refine_factor,
max_cells_per_dim=max_cells_per_dim,
copy_particles=copy_particles,
c_api_timer=c_api_timer,
isa=integer_isa)
isa=integer_isa,
**kwargs)
if extn_results is None:
msg = "RuntimeError occurred"
raise RuntimeError(msg)
Expand Down