Skip to content

Expose IdDiscrete, Hamming, BID as top-level dadapy imports#177

Merged
diegodoimo merged 5 commits into
mainfrom
fix_hamming_id_discrete_imports
May 16, 2026
Merged

Expose IdDiscrete, Hamming, BID as top-level dadapy imports#177
diegodoimo merged 5 commits into
mainfrom
fix_hamming_id_discrete_imports

Conversation

@diegodoimo
Copy link
Copy Markdown
Collaborator

@diegodoimo diegodoimo commented May 16, 2026

Summary

  • dadapy/__init__.py now exposes IdDiscrete (replacing from .id_discrete import *) and adds BID, Hamming from dadapy.hamming
  • Updated the affected tests, example notebooks (notebook_on_discreteID.ipynb, notebook_hamming.ipynb), and one docstring example in id_discrete.py to use the new short-form imports.

Related

Related to #156:

  • now, after his PR makes from dadapy import BID, Hamming syntax is supported, consistently with the classes imported from all the other modules of the package
  • makes the package compatible with numpy 1 environments, adding "NPY_TARGET_VERSION" to the setup file.

Test plan

  • pytest tests/test_id_discrete/test_discrete_id.py — 2/2 passing locally
  • python tests/test_hamming/test0.py — script runs end-to-end, BID optimization converges with expected values

@diegodoimo diegodoimo merged commit 2357c65 into main May 16, 2026
7 checks passed
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

Successfully merging this pull request may close these issues.

1 participant