question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

resample: ValueError: x and y arrays must be equal in length along interpolation axis.

See original GitHub issue

When trying to resample a dense variable (physio) with a sampling rate of 0.49999984750004656 the length of the x given to interp1d is one longer than values. My guess is that this has to do with a rounding error with the funky sampling_rate.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:27 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
effigiescommented, Jan 29, 2019

Possibly related to #355, #358?

1reaction
tyarkonicommented, Mar 7, 2019

Yeah, that makes sense. The resampling/densification code needs a complete overhaul. I have a plan for it, but need to find the time. Bunch of things to review in the next week or so, but probably after that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

x and y arrays must be equal in length along interpolation axis ...
I "plugged in" two arrays (filtered_mass and integrated_column), of same size, but it still give me ValueError that the sizes of the arrays...
Read more >
scipy.interpolate.interp1d — SciPy v1.9.3 Manual
A N-D array of real values. The length of y along the interpolation axis must be equal to the length of x. kindstr...
Read more >
SciPy interpolation ValueError: x and y arrays must be equal ...
I'm trying to work with interp1d of SciPy.interpolate. I "plugged in" two arrays (filtered_mass and integrated_column), of same size, but it still give...
Read more >
[Solved]-Interpolation in SciPy: Finding X that produces Y-numpy
yToFind = 140 yreduced = np.array(y) - yToFind freduced = interpolate. ... ValueError: x and y arrays must be equal in length along...
Read more >
Source code for pypeit.sampling
If (`y`) is 2D, the resampling is performed along the last axis (i.e., ... if x.size != self.y.shape[-1]: raise ValueError('Coordinate vector must match ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found