Giter Club home page Giter Club logo

Comments (3)

MuellerSeb avatar MuellerSeb commented on August 22, 2024

Was introduced here: #361

from emcee.

MuellerSeb avatar MuellerSeb commented on August 22, 2024

But even doing from numpy.exceptions import VisibleDeprecationWarning and replacing np.VisibleDeprecationWarning with VisibleDeprecationWarning in ensemble.py, I run into the following error:

File ~/AtWork/Cloud/GIT/GitHub/GeoStat/GSTools/src/gstools/random/rng.py:92, in RNG.sample_ln_pdf(self, ln_pdf, size, sample_around, nwalkers, burn_in, oversampling_factor)
     90 initial_state = State(init_guess, copy=True)
     91 initial_state.random_state = self.random.get_state()
---> 92 burn_in_state = sampler.run_mcmc(
     93     initial_state=initial_state, nsteps=burn_in
     94 )
     95 # reset after burn_in
     96 sampler.reset()

File ~/mambaforge/envs/gstools_np2/lib/python3.12/site-packages/emcee/ensemble.py:444, in EnsembleSampler.run_mcmc(self, initial_state, nsteps, **kwargs)
    441     initial_state = self._previous_state
    443 results = None
--> 444 for results in self.sample(initial_state, iterations=nsteps, **kwargs):
    445     pass
    447 # Store so that the ``initial_state=None`` case will work

File ~/mambaforge/envs/gstools_np2/lib/python3.12/site-packages/emcee/ensemble.py:411, in EnsembleSampler.sample(self, initial_state, log_prob0, rstate0, blobs0, iterations, tune, skip_initial_state_check, thin_by, thin, store, progress, progress_kwargs)
    409 # Save the new step
    410 if store and (i + 1) % checkpoint_step == 0:
--> 411     self.backend.save_step(state, accepted)
    413 pbar.update(1)
    414 i += 1

File ~/mambaforge/envs/gstools_np2/lib/python3.12/site-packages/emcee/backends/backend.py:228, in Backend.save_step(self, state, accepted)
    226 self.log_prob[self.iteration, :] = state.log_prob
    227 if state.blobs is not None:
--> 228     self.blobs[self.iteration, :] = state.blobs
    229 self.accepted += accepted
    230 self.random_state = state.random_state

ValueError: could not broadcast input array from shape (50,0) into shape (50,)

So there is more to it...

from emcee.

dfm avatar dfm commented on August 22, 2024

Thanks for bringing this up! I've been meaning to look into this, but I'm not 100% sure how much capacity I'll have. If you or anyone else wants to start looking into this and opening up a PR that would be very much appreciated!!

from emcee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.