Skip to content

well_data.py fails when predicting guassian1d on first time step #1

@setseed42

Description

@setseed42

When running bocpd_deriv at t==0, gaussian1D.predict tries to access a multidimensional matrix dpost_params which was only been initialised as an empty array.

Traceback (most recent call last):
  File "well_data.py", line 57, in <module>
    bocpd_dwrap1D(theta, X, model_f, hazard_f, conversion)
  File "/Users/erik/devs/abocpd/learn_bocpd.py", line 34, in bocpd_dwrap1D
    nlml, dnlml_h, dnlml_m = bocpd_deriv(theta_h, theta_m, X, hazard_f, model_f)
  File "/Users/erik/devs/abocpd/bocpd_deriv.py", line 41, in bocpd_deriv
    model_f.predict(X[t,:], needDerivatives=True)
  File "/Users/erik/devs/abocpd/UPM/gaussian1D.py", line 89, in predict
    dmu_dtheta    = np.transpose(self.dpost_params[0,:,:], axes=[2,1,0]) # N x 4
IndexError: too many indices for array

Tested with python==2.7, numpy==1.16.5, scipy==1.2.1

Is it possible to get an specification of the environment in which this has successfully run?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions