Skip to content

Commit

Permalink
.loc to avoid warnings (#255)
Browse files Browse the repository at this point in the history
* use to_numpy() on boolean mask to avoid warning

* remove print statements

* Converted .to_numpy to .log

* Removed extraneous brackets

---------

Co-authored-by: Will Handley <[email protected]>
  • Loading branch information
AdamOrmondroyd and williamjameshandley authored Feb 7, 2023
1 parent 0618a8f commit 67b9a96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions anesthetic/examples/perfect_ns.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def random_sphere(n):
r = (points**2).sum(axis=-1, keepdims=True)**0.5

samples = merge_nested_samples(samples)
logLend = samples[samples.nlive >= nlive].logL.max()
return samples[samples.logL_birth < logLend].recompute()
logLend = samples.loc[samples.nlive >= nlive].logL.max()
return samples.loc[samples.logL_birth < logLend].recompute()


def correlated_gaussian(nlive, mean, cov, bounds=None):
Expand Down

0 comments on commit 67b9a96

Please sign in to comment.