Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
92 views

I have a list of numbers that needs to be interpolated for the purpose of upscaling an image. I am using bilinear interpolation. The boundary must be of "clamp" type. Now consider the a ...
user877329's user avatar
  • 6,296
1 vote
1 answer
35 views

if x values change from 3 to 9 over a 60 seconds duration , and y values change from 4 to 6 in the same duration time (60 seconds ). what time n will make x = y ? I tried , X3 = X1 + ((Y3 - Y1) * ((X2 ...
moja's user avatar
  • 43
1 vote
1 answer
39 views

I have difficulties interpolating a grouped dataframe. My problem is: Some of my groups have no value at all, then either 0 or NA; some groups have only one value, then this should be multiplied and ...
Sulz's user avatar
  • 523
1 vote
0 answers
72 views

I am trying to translate the following MATLAB code to Python. In MATLAB, the code dynamically updates a single plot for multiple iterations (n = 1:100), and each update displays the interpolation ...
Mohamed's user avatar
  • 11
1 vote
0 answers
267 views

I use the asammdf python library to read files in MDF4 format and export them to CSV format : from asammdf import MDF mdf = MDF("C:/Users/haonf/Downloads/RecordFile_24-11-12_22_11_10_237.mf4"...
Florian HAON's user avatar
0 votes
1 answer
96 views

Currently ,I am working on netcdf file ,from which i need to extract data using wrf-python and plot in the graph, while plotting , i got an issue ( i have attached the image, you can refer it). Before ...
Samman Amgain's user avatar
1 vote
0 answers
46 views

RENDER There is a set of vertices: new Vector(-0.5,-0.5,-0.5), new Vector(-0.5, 0.5,-0.5), new Vector( 0.5, 0.5,-0.5), new Vector( 0.5,-0.5,-0.5), new Vector(-0....
Leonid Price's user avatar
0 votes
1 answer
276 views

A part of my python program linearly interpolates between two compass headings. It works fine as long as I don't have to deal with passing through North. Is there a good way to deal with this rather ...
Phillip Dobbs's user avatar
1 vote
4 answers
160 views

Consider the following implementation of linear interpolation: lerp(x1, x2, y1, y2, x) = y1 * (x - x2) / (x1 - x2) + y2 * (x - x1) / (x2 - x1) Is it true that x1 <= x <= x2 implies y1 <= lerp(...
gTcV's user avatar
  • 2,514
1 vote
0 answers
106 views

Is there any way to interpolate an 1D array against two n-dimensional arrays along certain axis? In particular, I have x and y arrays with shapes (6, 2, 10). I also have an x_in array with shape(10, ) ...
GioR's user avatar
  • 636
-1 votes
2 answers
115 views

I have several measured values, each in a time series. Time steps are unevenly distributed and also uneven between the data series. I'm trying to interpolate each series into a fixed 10 second time ...
mechanicalman's user avatar
1 vote
1 answer
66 views

This is a follow-up question to an earlier question: Implementing 1D interpolation on a 3D Array in Numpy or Xarray Tsoil is a 3D xarray dataset with the following dimensions: <xarray.DataArray '...
arctic_climate_science's user avatar
0 votes
1 answer
69 views

I have a timeseries dataset with four fields, eg: user_id, timestamp, miles, and total_mileage. Miles would be the amount of miles driven in one time step, the total_mileage the mileage of the car at ...
vcarbijn's user avatar
1 vote
2 answers
431 views

I'm looking for a way to create a "functor" for linear interpolation of time,value pairs using SciPy (or NumPy) but according to the SciPy tutorial there is none! (Kind of the opposite of ...
pipe's user avatar
  • 740
1 vote
1 answer
214 views

I'm struggling hard to perform a simple linear interpolation of a datacube of size Nx*Ny*Nz into a new one that would keep the other two dimensions constant i.e. the resulting output would be Nxnew*Ny*...
Georges Leukic's user avatar
0 votes
1 answer
110 views

I want to use linear interpolation to create a finer dataset where my responses y are non-monotonic and I need to interpolate onto a fixed y-grid (this is not negotiable). I have a script that does ...
RandomYellow's user avatar
-1 votes
2 answers
123 views

I have an energy counter (kWh) recorded in a MySQL database every 15 minutes. Sometimes the recording fails for several reasons (power outage, computer reboot for updates...) and values are missing. ...
Michael Uray's user avatar
0 votes
0 answers
57 views

Basically, I have this dataset with missing obs. So suppose we want to fill in missing data using the previous observation's Xs, and the average change for the Xs that exist for both the current and ...
BlackNinja's user avatar
0 votes
1 answer
105 views

I have a dataframe with 5 columns (a, b, c, d, e, f). I then have specific values for columns a, b and c and need to interpolate along the dataframe to get values for columns d and e as well. As a ...
xylo's user avatar
  • 1
1 vote
3 answers
1k views

I have the points: points = np.array([[0, 105],[5000, 105],[0, 135],[5000, 135],[0, 165],[5000, 165]]) and values values = np.array([[300, 380, 300, 390, 300, 400]]).transpose() with the inputs I'm ...
qwertytam's user avatar
  • 167
1 vote
0 answers
114 views

I am trying to write code that essentially performs linear interpolation for me and spits the result out into an email. I have set both the first column and top row as their own ranges (excluding 3300)...
kca062's user avatar
  • 63
2 votes
1 answer
538 views

This is an (x,y) plot I have of a vehicle's position data every 0.1 seconds. The total set is around 500 points. I read other solutions about interpolating with SciPy (here and here), but it seems ...
Java Weenis's user avatar
0 votes
1 answer
59 views

Original MATLAB Statement is - Output = (interp2(X,Y,Tbl',Z,ThrtlPrcnt,'linear')); Where parameter values (in Python) are X = array([0, 550, 600, 700, 800, 874, 900, 950, 1000, 1100, 1200, 1300, 1400,...
Dipak's user avatar
  • 1,259
0 votes
0 answers
70 views

A visual representation of what I want to do I have a transformer encoder decoder structure, but want to jointly train with ctc. The encoder outputs(vis softmax) the ctc frame wise probabilities(batch ...
Tom Mathew's user avatar
1 vote
2 answers
454 views

I would like to use linear interpolation to replace NA values on a Df. On my Df columns represent a time series of daily data, so the Df in on a wide format. My data represents Days (in columns) and ...
RGR_288's user avatar
  • 93
0 votes
0 answers
104 views

I have sparsely sampled slices of data which are aligned to a 3d volume (medical imaging volume). The slices are all parallel planes to one another. I want to perform a linear interpolation of the ...
Harry Carey's user avatar
1 vote
2 answers
120 views

I'm trying to linear interpolate a very large dataframe using the na.approx function. Works very well except for angular data e.g. wind directions. If you linear interpolate e.g. 350 and 10 you would ...
bvdrsche's user avatar
0 votes
1 answer
118 views

I'm trying to interpolate data by using the spline function (stats R package). Specifically, I have a dataset like the following one: DATE Y 01/01/2020 02/01/2020 0.705547512 04/01/2020 0....
basiliscus's user avatar
0 votes
1 answer
314 views

I have a wide dataframe with values (seconds) that decrease over time. Every row represents 1 day. It's like a "best time" for every column so the number can only decrease. There are gaps ...
rayer456's user avatar
2 votes
2 answers
121 views

I have a linear interpolation problem with nans in my data. I have instantaneous measurements that I want to resample from 6 min intervals to 5 min intervals. df = pd.DataFrame(zip(['10:00','10:06','...
pyaj's user avatar
  • 640
1 vote
1 answer
542 views

I am programming in the Godot game engine, and I have recently been working with interpolation to smooth out the turning (rotation) of one of my mob instances. I am new to interpolation in general, so ...
ZenPyro's user avatar
  • 101
1 vote
1 answer
449 views

I have a time series dataset that contains 29,184 hours of data. There are around 1k+ rows of missing values. Here is the link to the dataset: dropbox Here is a small preview of the dataset: ...
Joe's user avatar
  • 71
3 votes
1 answer
256 views

I have an example data frame below: data = [ [1, 2, 100, 4342], [3, 4, 100, 999], [5, 6, 500, 4339], [4, 5, 300, 999], [12, 13, 100, 4390], [6, 7, 600, 4335], [2, 3, 200, ...
rweber's user avatar
  • 142
2 votes
3 answers
851 views

I need to recode an equivalent of the NumPy interp function. In order to do that, I thought of building a pairwise distance matrix, and then using this matrix to define "weights" that I use ...
carlitador's user avatar
5 votes
0 answers
596 views

I have a 3D tensor data of shape (N, W, D) and another 1D tensor index of shape (B,). I need to sample data using index such that my output should be of shape (B,N,D). That is, for every element of ...
Nagabhushan S N's user avatar
0 votes
1 answer
270 views

I have a real-valued function G(t) which I want to interpolate over logarithmically evenly-spaced times: . This is needed in order to obtain an approximate expression of the components of G as a ...
Victor G.'s user avatar
0 votes
1 answer
70 views

I am reading a manuscript, and the authors state that variables L2, L3, L4 were calculated using linear interpolations of the first and last measurement occasions (L1 and L5). L1-L5 can be thought of ...
wooden05's user avatar
  • 195
5 votes
3 answers
3k views

Consider the following code example: # %% import numpy from scipy.interpolate import interp2d, RegularGridInterpolator x = numpy.arange(9000) y = numpy.arange(9000) z = numpy.random.randint(-1000, ...
HerpDerpington's user avatar
1 vote
0 answers
34 views

Grretings to all! In the Regression Kriging, i want to create a map for Standard Deviation of the Ordinary and the Regression Kriging. The pH.sd (from the OK, Ordinary Kriging) are in a matrix: double ...
Dimitris K's user avatar
1 vote
1 answer
263 views

I have recently started using Python and I have a problem that I would like to propose. I have three arrays (X1, X2, and X3). I need to apply linear interpolation. The goal is given new points with ...
MacUser's user avatar
  • 87
-1 votes
1 answer
343 views

I have a table like this: v p 3 89 3.5 178 4 328 4.5 522 5 758 5.5 1040 v goes from 3 to 24 in steps of 0.5 (v = List.Numbers(3, 43, 0.5)). p = {89, 178, 328, 522, 758, 1040, 1376, 1771, 2230, 2758, ...
Katrin's user avatar
  • 7
1 vote
0 answers
175 views

I have generated a sine wave using a 257-point look-up table that covers only one quadrant (4th quadrant). The entries in the table are in fixed point format (Q1.15) [o,.....,-32768]. linear ...
mjack34's user avatar
  • 11
0 votes
1 answer
148 views

In this problem I am trying to linearly interpoplate a set of provided data without numpy or any other importable functions. The problem really arises when I am trying to linearly interpolate between ...
Alex peterson's user avatar
2 votes
1 answer
467 views

I have time series data containing monthly observations. I now want the given interpolate monthly values (preferred linear, cubic is fine) according to a data sequence (for eg. 15-day sequence). The ...
kl40's user avatar
  • 53
2 votes
1 answer
751 views

Suppose I have a triangle say(PC0,PC1,PC2), and its barycentric coordinates is((1,0),(0,1),(0,0)), they are all in clip space. And now I want calculate the interpolated barycentric coordinates in ...
Mirocos's user avatar
  • 43
0 votes
1 answer
188 views

I am trying to use scipy linear interpolation to fill gaps in my data so that I can draw a scatter plot of my data. I also want to print the values changed by linear interpolation, but I am not sure ...
Tom Hart's user avatar
0 votes
1 answer
652 views

I have two NA's in my Data and I simply have to do a linear interpolation to find their value but I don't understand why it does not work. Here is the data. It is quite big. Here is what i've tried: ...
Barta Boucherrougui's user avatar
0 votes
1 answer
56 views

I have a dataset that looks like the below: > head(mydata) id value1 value2 1: 1 200001 300001 2: 2 200002 300002 3: 3 200003 300003 4: 4 200004 300004 5: 5 200005 300005 6: 6 200006 ...
matinang's user avatar
1 vote
1 answer
191 views

COVID-19 Data obtained from OurWorldInData includes total_boosters column to track vaccine boosters in any given country. My goal is to create a column for daily new boosters (boosters_new), then ...
RyanP's user avatar
  • 11
1 vote
1 answer
601 views

Is it possible to perform 2D interpolation in Julia where one of the coordinates is irregular? Take the following example, where x is irregular, but y is regular: x = [0.5 2 3 4.; 0.6 1 3 4.; ...
TylerD's user avatar
  • 469

1
2 3 4 5
10