Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error for the code #5

Open
Fangwq opened this issue Jan 3, 2019 · 2 comments
Open

error for the code #5

Fangwq opened this issue Jan 3, 2019 · 2 comments

Comments

@Fangwq
Copy link

Fangwq commented Jan 3, 2019

An error has been encountered when I run:
python exampleinference.py
The error is as follows:

Traceback (most recent call last):
File "./pbnt-master/examples/exampleinference.py", line 82, in
inferenceExample()
File "./pbnt-master/examples/exampleinference.py", line 67, in inferenceExample
Q = engine.marginal(sprinkler)[0]
File "../lib/pbnt/Inference.py", line 257, in marginal
self.global_propagation()
File "../lib/pbnt/Inference.py", line 287, in global_propagation
self.collect_evidence(0, startClique, 0, True)
File "../lib/pbnt/Inference.py", line 297, in collect_evidence
self.collect_evidence(currentClique, neighbor, sep, 0)
File "../lib/pbnt/Inference.py", line 297, in collect_evidence
self.collect_evidence(currentClique, neighbor, sep, 0)
File "../lib/pbnt/Inference.py", line 301, in collect_evidence
self.pass_message(currentClique, prevClique, sepset)
File "../lib/pbnt/Inference.py", line 315, in pass_message
oldSepsetPotential = self.project(fromClique, sepset)
File "../lib/pbnt/Inference.py", line 324, in project
sepset.potential = clique.potential.marginalize(sepset.potential)
File "../lib/pbnt/Distribution.py", line 66, in marginalize
index = self.generate_index_node(seq, intersect)
File "../lib/pbnt/Distribution.py", line 94, in generate_index_node
return self.generate_index(index, axes)
File "../lib/pbnt/Distribution.py", line 105, in generate_index
tmp[axis] = index
ValueError: shape mismatch: value array of shape (3,) could not be broadcast to indexing result of shape (2,)

I use python2.7 with Mac OS. Can you help me?

@toanbku
Copy link

toanbku commented Jun 28, 2020

Did you solve it?

@Fangwq
Copy link
Author

Fangwq commented Jun 29, 2020

@toanbku Sorry, I do not use this package any more. So I don't solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants