[Repo Assist] fix: replace removed np.float and np.int aliases with built-in equivalents#1426
Merged
emrekiciman merged 1 commit intomainfrom Apr 1, 2026
Conversation
…lents np.float and np.int were deprecated in NumPy 1.20 and removed in NumPy 1.24. The project requires numpy >2.0, so these cause AttributeError at runtime. - Replace np.float with float in apply_delta_kernel() - Replace np.int(...) with int(...) in KernelSampler.sample_point() Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
21 tasks
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 This PR was created by Repo Assist, an automated AI assistant.
Summary
Fixes two uses of NumPy type aliases (
np.floatandnp.int) that were deprecated in NumPy 1.20 and removed in NumPy 1.24. Since this project requiresnumpy >2.0, both calls raiseAttributeErrorat runtime.Root Cause
np.floatandnp.intwere convenience aliases for the built-in Pythonfloatandint. NumPy removed them entirely in 1.24 ([release notes]((numpy.org/redacted)Changes
dowhy/gcm/independence_test/kernel_operation.py.astype(np.float).astype(float)dowhy/do_samplers/kernel_density_sampler.pynp.int(n.cumprod()[-1])int(n.cumprod()[-1])Trade-offs
None —
floatandintare the correct replacements and behave identically in these contexts.Test Status
These functions (
apply_delta_kernelandKernelSampler.sample_point) currently have no direct unit tests, so CI tests do not exercise the fixed lines. The fixes are mechanical one-line corrections verified by code inspection. No CI infrastructure failures were observed in test runs against unrelated code.Note
🔒 Integrity filtering filtered 30 items
Integrity filtering activated and filtered the following items during workflow execution.
This happens when a tool call accesses a resource that does not meet the required integrity or secrecy level of the workflow.
list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".)