Skip to content

Conversation

@davidrandell84
Copy link
Collaborator

@davidrandell84 davidrandell84 commented Jan 20, 2026

Description

Scipy 1.17.0 is throwing a warning about conversion of data types in sparse.diags which affects parameter.py and giving many wanrings in testing.

Fixes # (issue)

Fix is to force the dtype not to let it figure it out.

From Scipy Documentation:

"Up until SciPy 1.19, the default behavior will be to return a matrix with an inexact (floating point) data type. In particular, integer input will be converted to double precision floating point. This behavior is deprecated, and in SciPy 1.19, the default behavior will be changed to return a matrix with the same data type as the input diagonals. To adopt this behavior before version 1.19, use dtype=None."

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Testing is unchanged but this removes several warnings in the unit testing

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link
Collaborator

@mattj89 mattj89 left a comment

Choose a reason for hiding this comment

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

Looks fine to me- just confirms existing data dtype in function call and avoids warnings.

@davidrandell84 davidrandell84 merged commit e67b396 into main Jan 21, 2026
17 checks passed
@davidrandell84 davidrandell84 deleted the fix_future_warning_sparse_diag branch January 21, 2026 08:54
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.

2 participants