Skip to content

Coefficients arrays must have the same dtype error in iswt function #449

@tallamjr

Description

@tallamjr

Within iswt(coeffs, wavelet) function of pywt/pywt/_swt.py there is a dtype check for cD coefficients but not for cA coefficients.

In the following line:

dt = _check_dtype(cD)
cD = np.asarray(cD, dtype=dt)

The dtype is set for cD's but there is not setting for cA's also.

This has the effect of when running something which changes the type of cD, cA's then become of a different dtype and gives the following error:
ValueError: Coefficients arrays must have the same dtype

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions