Skip to content

ValueError when running with newer Python / NumPy #37

@liamtoney

Description

@liamtoney

Using Python 3.14 / NumPy 2.4.3, running example.py results in an error:

File /path/to/lts_array/lts_array/classes/lts_classes.py:727, in post_process(dimension_number, co_array_num, alpha, h, nits, tau, xij, coeffs, lts_vel, lts_baz, element_weights, sigma_tau, p, conf_int_vel, conf_int_baz)
    725 with np.errstate(invalid='raise'):
    726     try:
--> 727         sigma_tau[jj] = np.sqrt(tau[weights, jj, :].T @ residuals / (
    728             m_w - dimension_number))[0]
    729     except FloatingPointError:
    730         pass

ValueError: setting an array element with a sequence.

This appears to be due to a new way that NumPy is array vs. scalar assignment. Related: uafgeotools/array_processing#52 (comment) — we can remove the pin on Python version once this issue is fixed, since that pin is what prevents this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions