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

simple mistake found in undouble.py #6

Closed
jomosi opened this issue Aug 20, 2022 · 2 comments
Closed

simple mistake found in undouble.py #6

jomosi opened this issue Aug 20, 2022 · 2 comments

Comments

@jomosi
Copy link

jomosi commented Aug 20, 2022

def compute_hash(self, method=None, hash_size=None, return_dict=False):

....

    if method=='whash-haar':
        if (np.ceil(np.log2(hash_size)) != np.floor(np.log2(hash_size))):
            logger.error('hash_size should be power of 2 (8, 16, 32, 64, ..., etc)')
            return None

Default value for hash_size (None) is passed to np.log2(hash_size) when hash_size is not given.

@erdogant
Copy link
Owner

erdogant commented Oct 23, 2022

Thanks for mentioning it! I set the default to 8 and created a new release (>= v1.2.9).

pip install -U bnlearn

@erdogant
Copy link
Owner

erdogant commented Dec 1, 2022

I am closing this issue. Reopen if required.

@erdogant erdogant closed this as completed Dec 1, 2022
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