Skip to content

support numpy>=2.0 in econml #944

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

Open
imatiach-msft opened this issue Jan 9, 2025 · 3 comments
Open

support numpy>=2.0 in econml #944

imatiach-msft opened this issue Jan 9, 2025 · 3 comments

Comments

@imatiach-msft
Copy link
Contributor

Getting errors when using econml with numpy>=2.0:

/usr/share/miniconda/envs/test/lib/python3.9/site-packages/responsibleai/managers/causal_manager.py:10: in <module>
    from econml.solutions.causal_analysis import CausalAnalysis
/usr/share/miniconda/envs/test/lib/python3.9/site-packages/econml/solutions/causal_analysis/__init__.py:4: in <module>
    from ._causal_analysis import CausalAnalysis
/usr/share/miniconda/envs/test/lib/python3.9/site-packages/econml/solutions/causal_analysis/_causal_analysis.py:13: in <module>
    from numpy.lib.function_base import iterable
E   ModuleNotFoundError: No module named 'numpy.lib.function_base'

numpy.lib.function_base was deprecated with numpy>=2.0 hence econml needs to fix the import to support it

@imatiach-msft
Copy link
Contributor Author

@imatiach-msft
Copy link
Contributor Author

sent PR with fix:
#945

@cranedroesch
Copy link

hi @imatiach-msft , would you mind sharing how you're running this with numpy 2+? The latest release still uses numpy <2. Your recent PR is to the main branch, and the main branch uses old numpy.

Context: I'd like to get econml working using modern numpy if I can, rather than downgrading the rest of my stack.

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