Skip to content

[Repo Assist] fix: replace removed np.float and np.int aliases with built-in equivalents#1426

Merged
emrekiciman merged 1 commit intomainfrom
repo-assist/fix-deprecated-numpy-api-v2-b9343122c65e2cd3
Apr 1, 2026
Merged

[Repo Assist] fix: replace removed np.float and np.int aliases with built-in equivalents#1426
emrekiciman merged 1 commit intomainfrom
repo-assist/fix-deprecated-numpy-api-v2-b9343122c65e2cd3

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

Fixes two uses of NumPy type aliases (np.float and np.int) that were deprecated in NumPy 1.20 and removed in NumPy 1.24. Since this project requires numpy >2.0, both calls raise AttributeError at runtime.

Root Cause

np.float and np.int were convenience aliases for the built-in Python float and int. NumPy removed them entirely in 1.24 ([release notes]((numpy.org/redacted)

Changes

File Line Before After
dowhy/gcm/independence_test/kernel_operation.py 52 .astype(np.float) .astype(float)
dowhy/do_samplers/kernel_density_sampler.py 105 np.int(n.cumprod()[-1]) int(n.cumprod()[-1])

Trade-offs

None — float and int are the correct replacements and behave identically in these contexts.

Test Status

These functions (apply_delta_kernel and KernelSampler.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.

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@b897c2f3e43bde9ff7923c8fa9211055b26e27cc

…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>
@github-actions github-actions bot added automation bug Something isn't working repo-assist labels Mar 29, 2026
@emrekiciman emrekiciman marked this pull request as ready for review April 1, 2026 07:20
Copy link
Copy Markdown
Member

@emrekiciman emrekiciman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@emrekiciman emrekiciman merged commit da99707 into main Apr 1, 2026
31 checks passed
@emrekiciman emrekiciman deleted the repo-assist/fix-deprecated-numpy-api-v2-b9343122c65e2cd3 branch April 1, 2026 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation bug Something isn't working repo-assist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant