Skip to content

TypeError: reshape() got an unexpected keyword argument 'newshape' #1427

@Jon77Mango

Description

@Jon77Mango

Is this a mismatch in package versions that other people have experienced?
Can anyone suggest what may have caused this or how to resolve?


Steps (on Mac):

Create a new conda environment using python 3.13. (changelogs say this is supported)
Installed latest meridian using pip :- pip install --upgrade google-meridian. (v 1.4.0 I believe)

In Python:
Imported packages
Built data object as previously done in version 1.12
Built MMM object as previously done

prior = prior_distribution.PriorDistribution(
    roi_m = tfp.distributions.LogNormal(roi_m_mu, roi_m_sigma),
    gamma_c = tfp.distributions.Normal(0, 5), 
    alpha_m = tfp.distributions.Beta(alpha_m_alpha, alpha_m_beta) 
)

model_spec = spec.ModelSpec(
    enable_aks=True,
    max_lag = 8,
    media_prior_type = 'roi',
    prior=prior)

Successfully sampled from priors
Error occurs when sampling from posterior; line 1013 identified =. self.posterior_sampler_callable()

Tensorflow version is 2.20.0
Numpy is 2.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions