Skip to content

resample error in python==3.14/numpy==2.4.2 #39

Description

@svilendobrev

the error is:

    r = samplerate.resample( y, ratio, res_type )  #simpleAPI

ValueError: cannot resize an array that references or is referenced
by another array in this way.
Use the np.resize function or refcheck=False

happens when ratio is non-int with fractional non-power-of-2 ( e.g. 3 works, 1.5 works, 1.51 does not).
e.g.

import samplerate,numpy
a = numpy.array( range( 44))
samplerate.resample( a, 1.51)

fails for numpy==2.4.2 but works ok with numpy==2.3.4

Note: the recent docs for numpy.resize mention something similar, may or may not be related: https://numpy.org/devdocs/reference/generated/numpy.ndarray.resize.html

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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