Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DeprecationWarning with NumPy>=1.25 (NumPy 2.x): array-to-scalar conversion in boiling_flow.py #19

Copy link
Copy link

Description

@burakatakan
Issue body actions

Environment:

  • ht: 1.2.0
  • numpy: 2.2.6
  • scipy: 1.15.3
  • Python: 3.12.10
  • OS: Windows 10/11

When running code that triggers boiling flow correlations, ht emits repeated warnings:

DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated,
and will error in future. Ensure you extract a single element from your array before
performing this operation. (Deprecated NumPy 1.25.)

Location:
ht/boiling_flow.py:841

Example warning line:
S = (1 - exp(-FhlX0/kl))/(FhlX0/kl)

This happens many times in a simulation / test suite (thousands of warnings).
It would be great if ht could avoid passing ndarray objects into scalar math functions
or explicitly convert 0-d arrays via .item() / float(np.asarray(x).squeeze()).

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.