Skip to content

Fix: dtype consistency in operators#747

Draft
mrava87 wants to merge 8 commits intoPyLops:devfrom
mrava87:fix-bilinearcast
Draft

Fix: dtype consistency in operators#747
mrava87 wants to merge 8 commits intoPyLops:devfrom
mrava87:fix-bilinearcast

Conversation

@mrava87
Copy link
Copy Markdown
Collaborator

@mrava87 mrava87 commented Apr 26, 2026

This PR fixes dtype consistency for the following operators when forward/adjoint is applied:

  • Bilinear: currently, because the indices are casted to np.int64, also the weights become np.float64 also when the input/operator is np.float32.
  • AVOLinearModelling: when vsvp is a scalar, the matrix G becomes fp64 by default, it is not now casted to the dtype of the operator.

As part of this PR, assertions for dtype are added to the test of all operators.

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 26, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@mrava87 mrava87 changed the title Fix: Bilinear dtype consistency Fix: dtype consistency in operators Apr 26, 2026
@mrava87 mrava87 self-assigned this Apr 26, 2026
@mrava87 mrava87 added the CI Test suite and CI label Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Test suite and CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant