File tree 1 file changed +0
-42
lines changed 1 file changed +0
-42
lines changed Original file line number Diff line number Diff line change @@ -1578,48 +1578,6 @@ def simple_linear_interpolation(a, steps):
1578
1578
.reshape ((len (x ),) + a .shape [1 :]))
1579
1579
1580
1580
1581
- def less_simple_linear_interpolation (x , y , xi , extrap = False ):
1582
- """
1583
- This function provides simple (but somewhat less so than
1584
- :func:`cbook.simple_linear_interpolation`) linear interpolation.
1585
- :func:`simple_linear_interpolation` will give a list of point
1586
- between a start and an end, while this does true linear
1587
- interpolation at an arbitrary set of points.
1588
-
1589
- This is very inefficient linear interpolation meant to be used
1590
- only for a small number of points in relatively non-intensive use
1591
- cases. For real linear interpolation, use scipy.
1592
- """
1593
- x = np .asarray (x )
1594
- y = np .asarray (y )
1595
- xi = np .atleast_1d (xi )
1596
-
1597
- s = list (y .shape )
1598
- s [0 ] = len (xi )
1599
- yi = np .tile (np .nan , s )
1600
-
1601
- for ii , xx in enumerate (xi ):
1602
- bb = x == xx
1603
- if np .any (bb ):
1604
- jj , = np .nonzero (bb )
1605
- yi [ii ] = y [jj [0 ]]
1606
- elif xx < x [0 ]:
1607
- if extrap :
1608
- yi [ii ] = y [0 ]
1609
- elif xx > x [- 1 ]:
1610
- if extrap :
1611
- yi [ii ] = y [- 1 ]
1612
- else :
1613
- jj , = np .nonzero (x < xx )
1614
- jj = max (jj )
1615
-
1616
- yi [ii ] = (y [jj ] +
1617
- (xx - x [jj ]) / (x [jj + 1 ] - x [jj ]) *
1618
- (y [jj + 1 ] - y [jj ]))
1619
-
1620
- return yi
1621
-
1622
-
1623
1581
@deprecated ('2.1' , alternative = 'shutil.rmtree' )
1624
1582
def recursive_remove (path ):
1625
1583
if os .path .isdir (path ):
You can’t perform that action at this time.
0 commit comments