johannesulf / nautilus

Neural Network-Boosted Importance Nested Sampling for Bayesian Statistics
https://nautilus-sampler.readthedocs.io
MIT License
73 stars 8 forks source link

sampler.posterior(return_as_dict=True, equal_weight=True) gives TypeError: unhashable type: 'numpy.ndarray' #43

Closed Joshuaalbert closed 9 months ago

Joshuaalbert commented 9 months ago

When sampling posterior into equal weights I get this error.

  File "/home/albert/git/jaxns-cosmology/jaxns_cosmology/nautilus_sampler.py", line 113, in run_sampler
    samples, _, _ = sampler.posterior(return_as_dict=True, equal_weight=True)
  File "/home/albert/miniconda3/envs/jaxns_cosmology_py/lib/python3.10/site-packages/nautilus/sampler.py", line 573, in posterior
    points = points[select]
TypeError: unhashable type: 'numpy.ndarray'
johannesulf commented 9 months ago

Hi @Joshuaalbert, thanks for raising this issue! Can you tell me which nautilus version you used? It looks like you used the latest release, version 0.7.4. It just so happens, I believe, that I fixed the exact issue you're describing two days ago. Does the issue still occur with the latest version in main?

johannesulf commented 9 months ago

Hi @Joshuaalbert, I'm assuming the issue is resolved in 1.0. Please re-open this issue if you keep encountering problems. Thanks for reporting the bug!